Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/extension/common/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function getSettingsPythonPath(resource?: Uri): Promise<string[] |
return undefined;
}

const runConfig = execInfo.activatedRun ?? execInfo.run;
const runConfig = execInfo.run;
traceLog(
`getSettingsPythonPath: Using executable='${runConfig.executable}' args='${
runConfig.args?.join(' ') || ''
Expand Down Expand Up @@ -255,9 +255,7 @@ export async function getInterpreterDetails(resource?: Uri): Promise<IInterprete
const env: PythonEnvironment | undefined = await api.getEnvironment(resource);
// resolve the environment to get full details
const resolvedEnv = env ? await api.resolveEnvironment(env?.environmentPath) : undefined;
const executablePath = resolvedEnv?.execInfo.activatedRun?.executable
? resolvedEnv.execInfo.activatedRun.executable
: resolvedEnv?.execInfo.run.executable;
const executablePath = resolvedEnv?.execInfo.run.executable;

const a: IInterpreterDetails = {
path: executablePath ? [executablePath] : undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/extension/debugger/adapter/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFac
*/
private async getExecutableCommand(interpreter: PythonEnvironment | undefined): Promise<string[]> {
if (interpreter) {
const executablePath = interpreter.execInfo.activatedRun?.executable ?? interpreter.execInfo.run.executable;
const executablePath = interpreter.execInfo.run.executable;
const version = interpreter.version;

// Parse version string (e.g., "3.8.10" -> major: 3, minor: 8)
Comment on lines 194 to 199
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behavior change: this now always uses execInfo.run.executable and ignores activatedRun entirely. Please add/adjust a unit test covering an environment where activatedRun.executable is a wrapper command (e.g., 'pixi') while run.executable is the real Python binary, to ensure the debug adapter is launched with the real interpreter and to prevent regressions.

Copilot uses AI. Check for mistakes.
Expand Down
Loading