Skip to content

Commit 6aae711

Browse files
Only check a script's extension if a script was given (#4186)
Since 'launch' can be used without a script in a weird way to debug the interactive session.
1 parent b3fb068 commit 6aae711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/DebugSession.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export class DebugSessionFeature extends LanguageClientConsumer
247247
vscode.window.showErrorMessage("Debugging untitled files in a temporary console is not supported.");
248248
return undefined;
249249
}
250-
} else {
250+
} else if (config.script) {
251251
const ext = path.extname(config.script).toLowerCase();
252252
if (!(ext === ".ps1" || ext === ".psm1")) {
253253
vscode.window.showErrorMessage(`PowerShell does not support debugging this file type: '${path.basename(config.script)}'`);

0 commit comments

Comments
 (0)