Cannot add python_d.exe as interpreter in PyCharm Community, but it works in VS Code

I am trying to add the Python debug executable as an interpreter in PyCharm Community Edition, but PyCharm does not accept it.

My Python installation folder is:

C:\Python314x64\

 

I have both:

C:\Python314x64\python.exe
C:\Python314x64\python_d.exe

 

The debug interpreter works normally in VS Code and also runs from Command Prompt. For example:

 

C:\Python314x64\python_d.exe --version

 

works without a problem.

However, when I try to add it in PyCharm using:

Settings → Project → Python Interpreter → Add Interpreter → Add Local Interpreter

 

and select:

C:\Python314x64\python_d.exe

 

PyCharm does not add it as a valid interpreter.

My questions are:

  1. Is python_d.exe supported as a project interpreter in PyCharm Community Edition?
  2. Do I need PyCharm Professional, or should this also be possible in PyCharm Community?
  3. Are there any extra requirements for PyCharm to recognize python_d.exe, such as debug binaries, debug DLLs, pip, or specific environment variables?
  4. Is there a recommended way to configure PyCharm to use Python debug builds on Windows?
  5. If python_d.exe works in VS Code and CMD, why might PyCharm still reject it?

For normal Python, I can use:

C:\Python314x64\python.exe

 

but for this project I specifically want to test using:

C:\Python314x64\python_d.exe

 

Thank you for your help.

0

Hi, it is a bug on PyCharm side (or rather an oversight). I'll fix it right away. Free PyCharm version is enough. I need to look into the details, but the problem is probably the executable name - PyCharm is overzealous in checking it. You could likely create a symbolic link to an executable and call it, e.g., `python.exe`, then point PyCharm to this link instead of `python_d.exe`.

0

请先登录再写评论。