File tree Expand file tree Collapse file tree 3 files changed +157
-177
lines changed Expand file tree Collapse file tree 3 files changed +157
-177
lines changed Original file line number Diff line number Diff line change 2626 "url" : " https://github.com/PowerShell/vscode-powershell.git"
2727 },
2828 "activationEvents" : [
29- " onDebugInitialConfigurations" ,
3029 " onDebugResolve:PowerShell" ,
3130 " onLanguage:powershell" ,
3231 " onCommand:PowerShell.NewProjectFromTemplate" ,
Original file line number Diff line number Diff line change @@ -153,13 +153,9 @@ export class DebugSessionFeature extends LanguageClientConsumer
153153 _folder : WorkspaceFolder | undefined ,
154154 config : DebugConfiguration ,
155155 _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+
158157 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 ( ) ;
163159 }
164160
165161 // 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