Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"url": "https://github.com/PowerShell/vscode-powershell.git"
},
"activationEvents": [
"onDebugInitialConfigurations",
"onDebugResolve:PowerShell",
"onLanguage:powershell",
"onCommand:PowerShell.NewProjectFromTemplate",
Expand Down
8 changes: 2 additions & 6 deletions src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,9 @@ export class DebugSessionFeature extends LanguageClientConsumer
_folder: WorkspaceFolder | undefined,
config: DebugConfiguration,
_token?: CancellationToken): Promise<DebugConfiguration> {
// Make sure there is a session running before attempting to debug/run a program
// TODO: Perhaps this should just wait until it's running or aborted.

if (this.sessionManager.getSessionStatus() !== SessionStatus.Running) {
const msg = "Cannot debug or run a PowerShell script until the PowerShell session has started. " +
"Wait for the PowerShell session to finish starting and try again.";
vscode.window.showWarningMessage(msg);
return undefined;
await this.sessionManager.start();
}

// Starting a debug session can be done when there is no document open e.g. attach to PS host process
Expand Down
Loading