Open tomatac opened 3 years ago
Interesting. Does this happen if you open up the https://github.com/microsoft/vscode-remote-try-cpp repository? (Or you can use the "Try a Sample" command and select C++).
This does not seem to reproduce for me on Ubuntu 20.04 using the Try a Sample method (nor on Windows + WSL2 w/ Ubuntu 20.04). I'd suggest raising a question about it with the C++ extension team at https://github.com/microsoft/vscode-cpptools/issues
I will try the hello world setup that you suggested. Is there any logs I can look at or any other troubleshooting techniques that I should try?
The C++ extension folks will have the experience there to help out. I unfortunately can't transfer the issue, but you can reference this one highlighting that it does not seem to be with the container image since gdb itself works as expected. https://github.com/microsoft/vscode-cpptools/issues
It's also possible you're running out of memory if this is a low end device. I know the C++ team recommends the 4GB RPis for working with ARM since 1-2GB tends too be too little to load a program of any size. But the fact you're seeing it with a hello world application probably says its something else. They can also tell you if it looks like it might be a known issue. You also should not use an external terminal since that is not supported (you can add "externalConsole": false
in your launch.json), but I wouldn't expect the error you mention there.
Thank you for your suggestions @Chuxel This is interesting! If I open "vscode-remote-try-cpp" repo, debugging works ok. Now, I copied the Dockerfile, devcontainer.json, launch.json and tasksjson from "vscode-remote-try-cpp" into my project, rebuilt the container and I am still getting the error! I tried running as root and as vscode user. I get the same error. gdb works ok if I ran it from inside the VS Code terminal in the container.
It is interesting that when I choose the debug option I can see some Launch options from my old configuration, when my launch.json has only one configuration "Build Main" copied from the vscode-remote-try-cpp".
Is VS Code cashing some data that can affect debugging in the container?
I will also open an issue on "vscode-cpptools" as you suggested but it looks it may have something to do with the environment of this particular project/container or maybe a new VS Code version. And as I mentioned before debugging used to work in this project.
Steps to Reproduce:
Do you have any suggestions to troubleshoot this issue?