File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 493493 "stopOnEntry" : true ,
494494 "pythonPath" : " ${config.python.pythonPath}" ,
495495 "program" : " ${workspaceRoot}/manage.py" ,
496- "cwd" : " null " ,
496+ "cwd" : " ${workspaceRoot} " ,
497497 "args" : [
498498 " runserver" ,
499499 " --noreload"
512512 "stopOnEntry" : false ,
513513 "pythonPath" : " ${config.python.pythonPath}" ,
514514 "program" : " fully qualified path fo 'flask' executable. Generally located along with python interpreter" ,
515- "cwd" : " null " ,
515+ "cwd" : " ${workspaceRoot} " ,
516516 "env" : {
517517 "FLASK_APP" : " ${workspaceRoot}/quickstart/app.py"
518518 },
534534 "stopOnEntry" : false ,
535535 "pythonPath" : " ${config.python.pythonPath}" ,
536536 "program" : " ${workspaceRoot}/run.py" ,
537- "cwd" : " null " ,
537+ "cwd" : " ${workspaceRoot} " ,
538538 "args" : [],
539539 "debugOptions" : [
540540 " WaitOnAbnormalExit" ,
549549 "stopOnEntry" : true ,
550550 "pythonPath" : " ${config.python.pythonPath}" ,
551551 "program" : " ${workspaceRoot}/console.py" ,
552- "cwd" : " null " ,
552+ "cwd" : " ${workspaceRoot} " ,
553553 "args" : [
554554 " dev" ,
555555 " runserver" ,
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export class PythonDebugger extends DebugSession {
8282
8383 private startDebugServer ( ) : Promise < IDebugServer > {
8484 let programDirectory = this . launchArgs ? path . dirname ( this . launchArgs . program ) : this . attachArgs . localRoot ;
85- if ( this . launchArgs && typeof this . launchArgs . cwd === 'string' && this . launchArgs . cwd . length > 0 ) {
85+ if ( this . launchArgs && typeof this . launchArgs . cwd === 'string' && this . launchArgs . cwd . length > 0 && this . launchArgs . cwd !== 'null' ) {
8686 programDirectory = this . launchArgs . cwd ;
8787 }
8888 this . pythonProcess = new PythonProcess ( 0 , "" , programDirectory ) ;
@@ -188,7 +188,7 @@ export class PythonDebugger extends DebugSession {
188188 }
189189 else {
190190 // When using modules ensure the cwd has been provided
191- if ( typeof args . cwd !== 'string' || args . cwd . length === 0 ) {
191+ if ( typeof args . cwd !== 'string' || args . cwd . length === 0 || this . launchArgs . cwd === 'null' ) {
192192 return this . sendErrorResponse ( response , 2001 , `'cwd' in 'launch.json' needs to point to the working directory` ) ;
193193 }
194194 }
You can’t perform that action at this time.
0 commit comments