Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01f8d14

Browse files
committed
warning for #913
1 parent d5e9606 commit 01f8d14

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/client/debugger/Main.ts

+12
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,18 @@ export class PythonDebugger extends DebugSession {
226226
return this.sendErrorResponse(response, 2001, `'cwd' in 'launch.json' needs to point to the working directory`);
227227
}
228228
}
229+
230+
let programDirectory = '';
231+
if (args && args.program) {
232+
programDirectory = path.dirname(args.program);
233+
}
234+
if (args && typeof args.cwd === 'string' && args.cwd.length > 0 && args.cwd !== 'null') {
235+
programDirectory = args.cwd;
236+
}
237+
if (programDirectory.length > 0 && fs.existsSync(path.join(programDirectory, 'pyenv.cfg'))){
238+
this.sendEvent(new OutputEvent(`Warning 'pyenv.cfg' can interfere with the debugger. Please rename or delete this file (temporary solution)`));
239+
}
240+
229241
this.sendEvent(new TelemetryEvent(telemetryContracts.Debugger.Load, {
230242
Debug_Console: args.console,
231243
Debug_DebugOptions: args.debugOptions.join(","),

0 commit comments

Comments
 (0)