@@ -125,7 +125,7 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
125125 }
126126
127127 /**
128- * Resolves Python interpreter paths and handles the legacy pythonPath deprecation .
128+ * Resolves Python interpreter paths.
129129 *
130130 * @param workspaceFolder The workspace folder URI for variable resolution and interpreter detection
131131 * @param debugConfiguration The launch configuration to update with resolved Python paths
@@ -145,37 +145,18 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
145145
146146 traceLog (
147147 `resolveAndUpdatePythonPath - Initial state: ` +
148- `pythonPath='${ debugConfiguration . pythonPath } ', ` +
149148 `python='${ debugConfiguration . python } ', ` +
150149 `debugAdapterPython='${ debugConfiguration . debugAdapterPython } ', ` +
151150 `debugLauncherPython='${ debugConfiguration . debugLauncherPython } ', ` +
152151 `workspaceFolder='${ workspaceFolder ?. fsPath } '` +
153152 `resolvedInterpreterPath='${ resolvedInterpreterPath } '` ,
154153 ) ;
155154
156- // STEP 1: Resolve legacy pythonPath property (DEPRECATED)
157- // pythonPath will equal user set value, or getInterpreterDetails if undefined or set to command
158- if ( debugConfiguration . pythonPath === '${command:python.interpreterPath}' || ! debugConfiguration . pythonPath ) {
159- this . pythonPathSource = PythonPathSource . settingsJson ;
160- debugConfiguration . pythonPath = resolvedInterpreterPath ;
161- } else {
162- // User provided explicit pythonPath in launch.json
163- debugConfiguration . pythonPath = resolveWorkspaceVariables (
164- debugConfiguration . pythonPath ,
165- workspaceFolder ?. fsPath ,
166- undefined ,
167- ) ;
168- }
169-
170- // STEP 2: Resolve current python property (CURRENT STANDARD)
171- if ( debugConfiguration . python === '${command:python.interpreterPath}' ) {
172- // if python is set to the command, resolve it
155+ // Resolve current python property
156+ if ( debugConfiguration . python === '${command:python.interpreterPath}' || ! debugConfiguration . python ) {
157+ // if python is set to the command or undefined, resolve it
173158 this . pythonPathSource = PythonPathSource . settingsJson ;
174159 debugConfiguration . python = resolvedInterpreterPath ;
175- } else if ( ! debugConfiguration . python ) {
176- // fallback to pythonPath if python undefined
177- this . pythonPathSource = PythonPathSource . settingsJson ;
178- debugConfiguration . python = debugConfiguration . pythonPath ;
179160 } else {
180161 // User provided explicit python path in launch.json
181162 this . pythonPathSource = PythonPathSource . launchJson ;
@@ -186,16 +167,12 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
186167 ) ;
187168 }
188169
189- // STEP 3: Set debug adapter and launcher Python paths (backwards compatible)
170+ // Set debug adapter and launcher Python paths
190171 this . setDebugComponentPythonPaths ( debugConfiguration ) ;
191-
192- // STEP 4: Clean up - remove the deprecated pythonPath property
193- delete debugConfiguration . pythonPath ;
194172 }
195173
196174 /**
197- * Sets debugAdapterPython and debugLauncherPython with backwards compatibility.
198- * Prefers pythonPath over python for these internal properties.
175+ * Sets debugAdapterPython and debugLauncherPython.
199176 *
200177 * @param debugConfiguration The debug configuration to update
201178 */
@@ -208,20 +185,11 @@ export abstract class BaseConfigurationResolver<T extends DebugConfiguration>
208185 debugConfiguration . debugLauncherPython === '${command:python.interpreterPath}' ||
209186 debugConfiguration . debugLauncherPython === undefined ;
210187
211- // Default fallback path (prefer pythonPath for backwards compatibility)
212- const fallbackPath = debugConfiguration . pythonPath ?? debugConfiguration . python ;
213-
214- if ( debugConfiguration . pythonPath !== debugConfiguration . python ) {
215- sendTelemetryEvent ( EventName . DEPRECATED_CODE_PATH_USAGE , undefined , {
216- codePath : 'different_python_paths_in_debug_config' ,
217- } ) ;
218- }
219-
220188 if ( shouldSetDebugAdapter ) {
221- debugConfiguration . debugAdapterPython = fallbackPath ;
189+ debugConfiguration . debugAdapterPython = debugConfiguration . python ;
222190 }
223191 if ( shouldSetDebugLauncher ) {
224- debugConfiguration . debugLauncherPython = fallbackPath ;
192+ debugConfiguration . debugLauncherPython = debugConfiguration . python ;
225193 }
226194 }
227195
0 commit comments