Skip to content

Commit d5e9606

Browse files
committed
fix #1047 display error with proposed fix to user
1 parent e7a504c commit d5e9606

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/client/debugger/Main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ export class PythonDebugger extends DebugSession {
194194
return Promise.resolve(true);
195195
}
196196
protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
197+
// Some versions may still exist with incorrect launch.json values
198+
const setting = '${config.python.pythonPath}';
199+
if (args.pythonPath === setting){
200+
return this.sendErrorResponse(response, 2001, `Invalid launch.json (re-create it or replace 'config.python.pythonPath' with 'config:python.pythonPath')`);
201+
}
197202
// Add support for specifying just the directory where the python executable will be located
198203
// E.g. virtual directory name
199204
try {

0 commit comments

Comments
 (0)