File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( "," ) ,
You can’t perform that action at this time.
0 commit comments