Skip to content

Commit 706b5a5

Browse files
authored
Workaround VSCode bug where ${script} var not expanded (#1095)
This happens when you start a debug session from a git diff window.
1 parent 82ca03c commit 706b5a5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/features/DebugSession.ts

+8
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,17 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
121121
vscode.window.showErrorMessage(msg);
122122
return;
123123
}
124+
125+
if (config.script === "${file}") {
126+
config.script = currentDocument.fileName;
127+
}
124128
}
125129
}
126130

131+
if (config.cwd === "${file}") {
132+
config.cwd = currentDocument.fileName;
133+
}
134+
127135
if (config.createTemporaryIntegratedConsole !== undefined) {
128136
createNewIntegratedConsole = config.createTemporaryIntegratedConsole;
129137
}

0 commit comments

Comments
 (0)