File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as vscode from 'vscode' ;
22import { dirname , join } from 'path' ;
3+ import { PythonSettings } from './common/configSettings' ;
34
45export function activateSingleFileDebug ( ) {
56 return vscode . commands . registerCommand ( 'python.python-debug.startSession' , config => {
@@ -8,7 +9,7 @@ export function activateSingleFileDebug() {
89 config . type = 'python' ;
910 config . name = 'Launch' ;
1011 config . request = 'launch' ;
11- config . pythonPath = "python" ;
12+ config . pythonPath = PythonSettings . getInstance ( ) . pythonPath ;
1213 config . debugOptions = [
1314 "WaitOnAbnormalExit" ,
1415 "WaitOnNormalExit" ,
@@ -39,10 +40,10 @@ export function activateSingleFileDebug() {
3940 if ( vscode . workspace && vscode . workspace . rootPath ) {
4041 config . envFile = join ( vscode . workspace . rootPath , '.env' ) ;
4142 }
42- if ( ! config . envFile && typeof config . cwd === 'string' && config . cwd . lengths > 0 ) {
43+ if ( ! config . envFile && typeof config . cwd === 'string' && config . cwd . lengths > 0 ) {
4344 config . envFile = join ( config . cwd , '.env' ) ;
4445 }
45-
46+
4647 }
4748
4849 vscode . commands . executeCommand ( 'vscode.startDebug' , config ) ;
You can’t perform that action at this time.
0 commit comments