code-server: Debugger does not start on C++, C#, Python, Go, PHP code
OS/Web Information
- Web Browser: Chrome
- Local OS: Windows 10
- Remote OS: Ubuntu 21.04
- Remote Architecture: arm64 on raspberry pi 4B
code-server --version: 3.12.0
Steps to Reproduce
- Write a CPP code and press debug
Expected
Debugger should start
Actual
Opens launch.json and nothing happens. Deleting launch.json temporarily solves the problem but after recreating launch.json, same problem happens again.
Screenshot

Notes
After updating 3.12.0 this problem started to happen. It worked fine before. I tried deleting all JSON configuration files and creating it again, reinstalling C/C++ plugin, and selecting other debug options, but nothing worked for me.
I’m not familiar with VSCode so maybe it is my configuration problem, and sorry if it is.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 23 (8 by maintainers)
It’s not related to C++. I’m having the exact same issue with C#.
And, indeed, this is the commit that fixed it in codespaces: https://github.com/microsoft/vscode/commit/63504d9cfa211e8e09660964d6b0d8280d6f9d12
It doesn’t seem that has been applied here yet.
I noticed whenever I right click in my c++ file and select “build and debug active file” it works, it also seems to work once after refreshing the page but when I immediately try and start the debugger it fails again, only after each refresh does it work one time again. Hope this contributes something at least
https://user-images.githubusercontent.com/32795234/135478074-49d98a2c-318a-433d-9842-2b0e4c65ab27.MP4
Doesn’t work also for me for a Python or a Go app. The solution is to use 3.11.0
For me, the debugging works on the first time i reload the window. After that, i cant start the debugger. It then asks me to select an environment and then like discussed here just opens the launch.json file. It even executes my Build-Task from tasks.json correctly, and then debugs it properly with breakpoints etc. The project is written in C.
Just saw that frank8922 wrote that too. Exactly the same behaviour for me.
Yes,it works.thanks for your attention and hard works.
@jsjoeio @cleardusk @globalww,
I believe this may be resolved in upstream’s version 1.60.2, which we’re targeting in next week’s release schedule. Thank you for your patience!
@jsjoeio Debugger does not start on Python, too.
Let’s try
CMakeLists.txt:and
code_server_issues_4221.cpp:Similar issue here. I have a c++ configuration in launch.json and debugging worked before. It looks like vscode tries to debug file that is currently edited (makes no sense). When launch.json is opened and I try to start c++ debugging by selecting my configuration, I see this message:
I confirm that the debugger works in v4.1.0.
Same behavior for golang debugging as well
Same behavior for java debugging as well, at least any entry of type “attach” in launch.json is ignored and debugger wants to use the current open file.