diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index affda52110..11a8bdbdb7 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -121,9 +121,17 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider vscode.window.showErrorMessage(msg); return; } + + if (config.script === "${file}") { + config.script = currentDocument.fileName; + } } } + if (config.cwd === "${file}") { + config.cwd = currentDocument.fileName; + } + if (config.createTemporaryIntegratedConsole !== undefined) { createNewIntegratedConsole = config.createTemporaryIntegratedConsole; }