Python debug adapter not starting
See original GitHub issueOn 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"
}
]
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (1 by maintainers)
Top Results From Across the Web
Python - Debug Adapter Fails to Start When Launching Code ...
Hello,. I am having an issue where when I attempt to launch a Python script from a cloned Solution on a network server,...
Read more >Python: Failed to Launch Debug Adapter, Operation was ...
1 Answer 1 · Drop down the Python environment selector, · Navigate to existing environment · Select the latest version of python environment...
Read more >VS Code Debugger not working for python - Microsoft Q&A
Debugging was working fine. Any troubleshooting tips. It seems when I do Run->"start Debugging' no command comes to terminal. Any VS Code log ......
Read more >Debugging Python In Visual Studio by Lee Fig
I think the problem is with the VS debug adapter. ... Is there a way to launch the python -lean runtime without using...
Read more >Python debugger not working while normal run does
The python debugger in Pycharm (I've the latest version) is not working for any Python file (so it's not my project or anything)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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).
Yes I did. That’s weird. Though all is working now so for me we do not have to continue the investigation. Deepak if you think there might be something useful hiding here let me know and we can debug it together.