1

Background:

I'm facing an issue in VS Code where my Python script runs fine using the "Run" button but fails silently when using "Debug".

Environment:

  • Windows 10
  • Python 3.10
  • VS Code with Python extension
  • Virtual environment used (Miniconda)
  • Script runs normally with:
python your_script.py

What I Found:

The issue was due to selecting the symlinked python.exe in the Scripts folder of the virtual environment.
This interpreter works with "Run" but breaks with "Debug".
When I clicked the "Debug" button, nothing happened. I just saw the icon blink briefly. Switching to the root-level python.exe fixed it.

Question:

Why does the Scripts/python.exe work with "Run" but not with "Debug"?
What internal difference causes this behavior?

Why symlink?

I used to create the symlink to ensure compatibility with tools expecting the Scripts/python.exe path, as Conda places python.exe in the root of the environment.

2
  • Perhaps a silly question, but to be clear, are you talking about a shortcut or a true symlink? Commented Apr 17 at 1:45
  • @BrendanMitchell Not a shortcut (.lnk), but a true symlink that is created by mklink.exe.
    – KLc3088
    Commented Apr 17 at 4:02

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.