File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
PowerShellEditorServices.Protocol/Server
PowerShellEditorServices/Session
test/PowerShellEditorServices.Test/Debugging Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -324,9 +324,6 @@ protected async Task HandleDisconnectRequest(
324
324
{
325
325
await requestContext . SendResult ( null ) ;
326
326
this . editorSession . PowerShellContext . SessionStateChanged -= handler ;
327
-
328
- // Stop the server
329
- await this . Stop ( ) ;
330
327
}
331
328
} ;
332
329
Original file line number Diff line number Diff line change @@ -706,13 +706,16 @@ public void AbortExecution()
706
706
{
707
707
Logger . Write ( LogLevel . Verbose , "Execution abort requested..." ) ;
708
708
709
- this . powerShell . BeginStop ( null , null ) ;
710
- this . SessionState = PowerShellContextState . Aborting ;
711
-
712
709
if ( this . IsDebuggerStopped )
713
710
{
714
711
this . ResumeDebugger ( DebuggerResumeAction . Stop ) ;
715
712
}
713
+ else
714
+ {
715
+ this . powerShell . BeginStop ( null , null ) ;
716
+ }
717
+
718
+ this . SessionState = PowerShellContextState . Aborting ;
716
719
}
717
720
else
718
721
{
@@ -1114,7 +1117,6 @@ private static SessionStateChangedEventArgs TranslateInvocationStateInfo(PSInvoc
1114
1117
break ;
1115
1118
1116
1119
case PSInvocationState . Stopping :
1117
- // TODO: Collapse this so that the result shows that execution was aborted
1118
1120
newState = PowerShellContextState . Aborting ;
1119
1121
break ;
1120
1122
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ await this.AssertStateChange(
474
474
this . debugService . Abort ( ) ;
475
475
await this . AssertStateChange (
476
476
PowerShellContextState . Ready ,
477
- PowerShellExecutionResult . Aborted ) ;
477
+ PowerShellExecutionResult . Completed ) ;
478
478
}
479
479
480
480
[ Fact ]
@@ -497,7 +497,7 @@ await this.AssertStateChange(
497
497
this . debugService . Abort ( ) ;
498
498
await this . AssertStateChange (
499
499
PowerShellContextState . Ready ,
500
- PowerShellExecutionResult . Aborted ) ;
500
+ PowerShellExecutionResult . Completed ) ;
501
501
}
502
502
503
503
[ Fact ]
You can’t perform that action at this time.
0 commit comments