From a040a800838ff1e1a8341b7509c4ecdb73a33e67 Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Fri, 10 Nov 2017 00:32:48 -0700 Subject: [PATCH] Workaround VSCode bug where ${script} var not expanded This happens when you start a debug session from a git diff window. --- src/features/DebugSession.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }