File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
extensions/positron-python/src/client
debugger/extension/configuration/resolvers Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export namespace Diagnostics {
34
34
) ;
35
35
export const invalidPythonPathInDebuggerSettings = localize (
36
36
'diagnostics.invalidPythonPathInDebuggerSettings' ,
37
- 'You need to select a Python interpreter before you start debugging.\n\nTip: click on "Select Python Interpreter" in the status bar.' ,
37
+ 'You need to select a Python interpreter before you start debugging.\n\nTip: click on "Select Interpreter" in the status bar.' ,
38
38
) ;
39
39
export const invalidPythonPathInDebuggerLaunch = localize (
40
40
'diagnostics.invalidPythonPathInDebuggerLaunch' ,
Original file line number Diff line number Diff line change @@ -124,9 +124,12 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
124
124
( await this . interpreterService . getActiveInterpreter ( workspaceFolder ) ) ?. path ??
125
125
this . configurationService . getSettings ( workspaceFolder ) . pythonPath ;
126
126
debugConfiguration . pythonPath = interpreterPath ;
127
- this . pythonPathSource = PythonPathSource . settingsJson ;
128
127
} else {
129
128
debugConfiguration . pythonPath = systemVariables . resolveAny ( debugConfiguration . pythonPath ) ;
129
+ }
130
+ if ( debugConfiguration . python === '${command:python.interpreterPath}' || ! debugConfiguration . python ) {
131
+ this . pythonPathSource = PythonPathSource . settingsJson ;
132
+ } else {
130
133
this . pythonPathSource = PythonPathSource . launchJson ;
131
134
}
132
135
debugConfiguration . python = systemVariables . resolveAny ( debugConfiguration . python ) ;
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import { IConfigurationService } from '../../../../common/types';
13
13
import { IInterpreterService } from '../../../../interpreter/contracts' ;
14
14
import { DebuggerTypeName } from '../../../constants' ;
15
15
import { DebugOptions , DebugPurpose , LaunchRequestArguments } from '../../../types' ;
16
- import { PythonPathSource } from '../../types' ;
17
16
import { BaseConfigurationResolver } from './base' ;
18
17
import { IDebugEnvironmentVariablesService } from './helper' ;
19
18
@@ -195,9 +194,7 @@ export class LaunchConfigurationResolver extends BaseConfigurationResolver<Launc
195
194
debugConfiguration . debugAdapterPython ,
196
195
debugConfiguration . debugLauncherPython ,
197
196
] ) {
198
- const source =
199
- executable === debugConfiguration . pythonPath ? this . pythonPathSource : PythonPathSource . launchJson ;
200
- if ( ! ( await diagnosticService . validatePythonPath ( executable , source , folder ?. uri ) ) ) {
197
+ if ( ! ( await diagnosticService . validatePythonPath ( executable , this . pythonPathSource , folder ?. uri ) ) ) {
201
198
return false ;
202
199
}
203
200
}
You can’t perform that action at this time.
0 commit comments