File tree 2 files changed +7
-4
lines changed
src/PowerShellEditorServices/Services/DebugAdapter
test/PowerShellEditorServices.Test/Debugging
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ internal class DebugService
45
45
private int nextVariableId ;
46
46
private string temporaryScriptListingPath ;
47
47
private List < VariableDetailsBase > variables ;
48
- private VariableContainerDetails globalScopeVariables ;
48
+ internal VariableContainerDetails globalScopeVariables ;
49
49
private VariableContainerDetails scriptScopeVariables ;
50
50
private VariableContainerDetails localScopeVariables ;
51
51
private StackFrameDetails [ ] stackFrameDetails ;
Original file line number Diff line number Diff line change @@ -95,17 +95,20 @@ await debugService.SetCommandBreakpointsAsync(
95
95
new [ ] { CommandBreakpointDetails . Create ( "Get-Random" ) } ) . ConfigureAwait ( false ) ;
96
96
97
97
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
+ ) ;
99
102
100
103
AssertDebuggerStopped ( "" , 1 ) ;
101
104
debugService . Continue ( ) ;
102
- await executeTask . ConfigureAwait ( false ) ;
105
+ // await executeTask.ConfigureAwait(false);
103
106
104
107
StackFrameDetails [ ] stackFrames = await debugService . GetStackFramesAsync ( ) . ConfigureAwait ( false ) ;
105
108
Assert . Equal ( StackFrameDetails . NoFileScriptPath , stackFrames [ 0 ] . ScriptPath ) ;
106
109
107
110
VariableDetailsBase [ ] variables =
108
- debugService . GetVariables ( stackFrames [ 0 ] . AutoVariables . Id ) ;
111
+ debugService . GetVariables ( debugService . globalScopeVariables . Id ) ;
109
112
110
113
var var = variables . FirstOrDefault ( v => v . Name == "$Error" ) ;
111
114
Assert . NotNull ( var ) ;
You can’t perform that action at this time.
0 commit comments