File tree 3 files changed +157
-177
lines changed
3 files changed +157
-177
lines changed Original file line number Diff line number Diff line change 26
26
"url" : " https://github.com/PowerShell/vscode-powershell.git"
27
27
},
28
28
"activationEvents" : [
29
- " onDebugInitialConfigurations" ,
30
29
" onDebugResolve:PowerShell" ,
31
30
" onLanguage:powershell" ,
32
31
" onCommand:PowerShell.NewProjectFromTemplate" ,
Original file line number Diff line number Diff line change @@ -153,13 +153,9 @@ export class DebugSessionFeature extends LanguageClientConsumer
153
153
_folder : WorkspaceFolder | undefined ,
154
154
config : DebugConfiguration ,
155
155
_token ?: CancellationToken ) : Promise < DebugConfiguration > {
156
- // Make sure there is a session running before attempting to debug/run a program
157
- // TODO: Perhaps this should just wait until it's running or aborted.
156
+
158
157
if ( this . sessionManager . getSessionStatus ( ) !== SessionStatus . Running ) {
159
- const msg = "Cannot debug or run a PowerShell script until the PowerShell session has started. " +
160
- "Wait for the PowerShell session to finish starting and try again." ;
161
- vscode . window . showWarningMessage ( msg ) ;
162
- return undefined ;
158
+ await this . sessionManager . start ( ) ;
163
159
}
164
160
165
161
// Starting a debug session can be done when there is no document open e.g. attach to PS host process
You can’t perform that action at this time.
0 commit comments