microsoft / microsoft/vscode-python-debugger

No-config debug uses default system Python on MacOS, not the active Python in terminal

Open
#605 17 comments 1 reaction 1 assignee View on GitHub

@eleanorjboyd is already working on this.

Since Feb 18, 2025.

triage-needed
Dominant language
TypeScript
Stars
181
Forks
126
Avg merge
2d 3h
Merged PRs (30d)
3

Description

Running VS code on MacOS, for a script go.py:

import sys
print(sys.prefix)

I get the following in a VS code integrated terminal where I have activated a Python 3.12 conda environment:

$ python -V
Python 3.12.8
$ python go.py
/Users/aldcroft/miniconda3-arm/envs/ska3-flight-2025.0rc2
$ debugpy go.py
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9

If I use the traditional configured debug in VS code, then I get the expected results (Python 3.12.8 from my conda env). I had thought that no-config debug should just work and pick up the current environment in the terminal window.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.