PowerShellEditorServices: Regression: Most of FileInfo object properties is missing in debug view

Most of FileInfo object properties is missing in debug view comparing to latest stable release of VSC for PowerShell (v2021.10.2)

Only small set of properties is visible:

#inculded in view:

PSPath
PSParentPath
PSChildName
PSDrive
PSProvider
PSIsContainer
Mode

#not included:

VersionInfo
BaseName
Target
LinkType
Name
Length
DirectoryName
Directory
IsReadOnly
Exists
FullName
Extension
CreationTime
CreationTimeUtc
LastAccessTime
LastAccessTimeUtc
LastWriteTime
LastWriteTimeUtc
Attributes

Latest preview version of VSC for PowerShell (v2021.12.0): image

VS

Latest stable version of VSC for PowerShell (v2021.10.2): image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@andschwa this might fall into your wheelhouse, its failing to fetch the property because a runspace isn’t present

So you remember when I said “script properties might blow up though”. Yeah turns out script properties blow up, we need to make sure we’re excluding them. Or marshal back to the pipeline thread to get the value.

I don’t think any workaround is needed in PSES since it was a change in PowerShell itself. It’s not hard to fix it there and even port it back to current LTS version.

@SeeminglyScience excluding them I can do for now, I may need help with the second part. It did blow up on “basename” which is a scriptproperty

Looks like for FileInfo objects specifically a GetValueInvocationException is getting swallowed and causing the silent failure of the remaining properties

Exception thrown: 'System.Management.Automation.GetValueInvocationException' in System.Management.Automation.dll

As @SeeminglyScience noted in a discussion, it looks like only non-NoteProperties are missing: image