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(
324324 {
325325 await requestContext . SendResult ( null ) ;
326326 this . editorSession . PowerShellContext . SessionStateChanged -= handler ;
327-
328- // Stop the server
329- await this . Stop ( ) ;
330327 }
331328 } ;
332329
Original file line number Diff line number Diff line change @@ -706,13 +706,16 @@ public void AbortExecution()
706706 {
707707 Logger . Write ( LogLevel . Verbose , "Execution abort requested..." ) ;
708708
709- this . powerShell . BeginStop ( null , null ) ;
710- this . SessionState = PowerShellContextState . Aborting ;
711-
712709 if ( this . IsDebuggerStopped )
713710 {
714711 this . ResumeDebugger ( DebuggerResumeAction . Stop ) ;
715712 }
713+ else
714+ {
715+ this . powerShell . BeginStop ( null , null ) ;
716+ }
717+
718+ this . SessionState = PowerShellContextState . Aborting ;
716719 }
717720 else
718721 {
@@ -1114,7 +1117,6 @@ private static SessionStateChangedEventArgs TranslateInvocationStateInfo(PSInvoc
11141117 break ;
11151118
11161119 case PSInvocationState . Stopping :
1117- // TODO: Collapse this so that the result shows that execution was aborted
11181120 newState = PowerShellContextState . Aborting ;
11191121 break ;
11201122
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ await this.AssertStateChange(
474474 this . debugService . Abort ( ) ;
475475 await this . AssertStateChange (
476476 PowerShellContextState . Ready ,
477- PowerShellExecutionResult . Aborted ) ;
477+ PowerShellExecutionResult . Completed ) ;
478478 }
479479
480480 [ Fact ]
@@ -497,7 +497,7 @@ await this.AssertStateChange(
497497 this . debugService . Abort ( ) ;
498498 await this . AssertStateChange (
499499 PowerShellContextState . Ready ,
500- PowerShellExecutionResult . Aborted ) ;
500+ PowerShellExecutionResult . Completed ) ;
501501 }
502502
503503 [ Fact ]
You can’t perform that action at this time.
0 commit comments