vscode-python: Python debug adapter not starting
On my work machine I can nicely debug Python. However on my personal machine it is not working (it was previously working and I am not sure what changed in the meantime).
Here’s what I am seeing with a simple print(“hello”)
script on my macOS:
- I can run the python script using the run button
- If I debug the python script it will not get executed and neither the breakpoints will get hit
- It seems like starting the debug adapter fails because Karthik looked into the logs and they are completely empty
- I can reproduce this with any combination of VS Code Stable, VS Code Insiders, Python Stable, Python Insiders
- I can not reproduce if I tell Python to use Interpreter 2.7.16
- I can reproduce if I use Python 3.9 64 bit and 3.8.9 64 bit
- Debugging from the VS Code side it looks like the
init
call fails - I installed XCode 12 since this was last working. So this is my main suspect of the breakage.
Let me know what more information you need and I will be happy to provide it. Thanks a lot, really appreciate the help
My launch.json
for reference:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (1 by maintainers)
@isidorn I have no ideas…
For me Python debugging just works. My python path is:
/Users/weinand/.pyenv/shims/python
A week ago I installed XCode 13.0 and that did not change anything in my Python setup.@deepak1556 for investigating Isidor’s problem, we started VS Code with the
--inspect-extensions <port>
command line argument, which puts the extension host node.js process in debug mode so that we can attach a debugger. But weirdly enough this prevents the problem from occurring.Since the extension host runs in the Electron provided node.js, I wonder whether you are aware of any Electron/node.js issues that are related to spawning other programs on macOS (in this case the node.js based debug adapter for Python).