Skip to content

Commit 2250480

Browse files
committed
fix #769
1 parent 557b81e commit 2250480

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/client/singleFileDebug.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as vscode from 'vscode';
22
import { dirname, join } from 'path';
3+
import { PythonSettings } from './common/configSettings';
34

45
export 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);

0 commit comments

Comments
 (0)