PowerShellEditorServices
PowerShellEditorServices copied to clipboard
Fix `DebuggerVariableProcessObjDisplaysCorrectly` scenario
This unit test is currently skipped, indicating a bug in product code:
https://github.com/PowerShell/PowerShellEditorServices/blob/c4f424fcdd931cc0ef3d9a970d628f83f994e77b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs#L964-L987
It turns out that what's happening is that when this is getting the children variables: https://github.com/PowerShell/PowerShellEditorServices/blob/aa1c253fd009cfcc2812dbf38ddca8a920f1f40c/src/PowerShellEditorServices/Services/DebugAdapter/Debugging/VariableDetails.cs#L263-L277
It throws a GetValueInvocationException
:
Exception getting "Path": "There is no Runspace available to run scripts in this thread. You can provide one in the DefaultRunspace property of the System.Management.Automation.Runspaces.Runspace type. The script block you attempted to invoke was: $this.Mainmodule.FileName"
and @JustinGrote actually has a fix in the works with https://github.com/PowerShell/PowerShellEditorServices/pull/1688, which @SeeminglyScience wants to rewrite and get in.