File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/PowerShellEditorServices/Services/DebugAdapter
test/PowerShellEditorServices.Test/Debugging Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ internal class DebugService
4545 private int nextVariableId ;
4646 private string temporaryScriptListingPath ;
4747 private List < VariableDetailsBase > variables ;
48- private VariableContainerDetails globalScopeVariables ;
48+ internal VariableContainerDetails globalScopeVariables ;
4949 private VariableContainerDetails scriptScopeVariables ;
5050 private VariableContainerDetails localScopeVariables ;
5151 private StackFrameDetails [ ] stackFrameDetails ;
Original file line number Diff line number Diff line change @@ -95,17 +95,20 @@ await debugService.SetCommandBreakpointsAsync(
9595 new [ ] { CommandBreakpointDetails . Create ( "Get-Random" ) } ) . ConfigureAwait ( false ) ;
9696
9797 Task executeTask = _psesHost . ExecutePSCommandAsync (
98- new PSCommand ( ) . AddCommand ( "Get-Random" ) . AddParameter ( "Maximum" , 100 ) , CancellationToken . None ) ;
98+ new PSCommand ( ) . AddCommand ( "Get-Random" ) . AddParameter ( "Maximum" , 100 ) ,
99+ CancellationToken . None ,
100+ // new PowerShellExecutionOptions { MustRunInForeground = true, ThrowOnError = false }
101+ ) ;
99102
100103 AssertDebuggerStopped ( "" , 1 ) ;
101104 debugService . Continue ( ) ;
102- await executeTask . ConfigureAwait ( false ) ;
105+ // await executeTask.ConfigureAwait(false);
103106
104107 StackFrameDetails [ ] stackFrames = await debugService . GetStackFramesAsync ( ) . ConfigureAwait ( false ) ;
105108 Assert . Equal ( StackFrameDetails . NoFileScriptPath , stackFrames [ 0 ] . ScriptPath ) ;
106109
107110 VariableDetailsBase [ ] variables =
108- debugService . GetVariables ( stackFrames [ 0 ] . AutoVariables . Id ) ;
111+ debugService . GetVariables ( debugService . globalScopeVariables . Id ) ;
109112
110113 var var = variables . FirstOrDefault ( v => v . Name == "$Error" ) ;
111114 Assert . NotNull ( var ) ;
You can’t perform that action at this time.
0 commit comments