Closed tomatac closed 3 years ago
This doesn't seem like an issue with our extension. I assume it would crash when you run the app from the command line, right? It seems like some issue with your compiler, libraries, or runtime.
@sean-mcmanus The strange thing is that it appears to run fine from the terminal based on this comment:
if I run gdb, from the terminal, inside vs code, debugging is normal
This was originally raised as microsoft/vscode-dev-containers#827 where it happened from inside a development container that should give a consistent toolchain. I am not able to repro.
I think it is an issue with the interface between the VS Code and gdb that is particular to this project (folder in VS Code). The gdb works fine from a terminal inside the VS Code. If not debugged the program runs fine from VS Code. It does not seam to be related to the container as I stripped down the container to the basics and it is still happening. The same container configuration in a different project works fine. Debugging used to work in this project. It looks like something got corrupted and it stooped working.
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?
Is there a way to troubleshoot the VS Code debugger?
I uninstalled / reinstalled VS Code and it is still not working.
Deleting all files and sub-folders from this folder solved the issue: ~/.config/Code Obviously I lost my configuration settings
The same issue appeared again as I was just stepping through the program using the VS Code debugger. Some UI clues when that happens:
@tomatac Do you have expressions in the watch Window that when evaluated could cause your program to crash when evaluated?
@WardenGnaw Do you think this could be a C/C++ debugger bug?
I am not sure if i had anything in the watch window. If it was any variable, it was something simple (not an expression). It looks like when the crash appear, to recover and be able to debug again, the fix is to erase all VS Code settings. I could try to erase just part of the settings and see what setting makes the debugger crash. Do you know what settings (files, folder, ...) could be linked to the debugger?
I don't know of any debugger settings that could affect this, other than launch.json. @WardenGnaw might.
Deleting all files and sub-folders from this folder solved the issue: ~/.config/Code Typically the launch.json is typically stored with the project and that did not seam to have an influence on this specific issue.
Yeah, I'm not aware of any debugger extension data that is cached at ~/.config/Code by our extension, so I'm guessing maybe VS Code itself might have stored something there that caused the issue?
The only customizations I am aware of are gdb init file or customizations to launch the debugger in launch.json with setupCommands
.
Closing due to it being cause by external folders.
@tomatac Do you have expressions in the watch Window that when evaluated could cause your program to crash when evaluated?
@WardenGnaw Do you think this could be a C/C++ debugger bug?
I encountered the same problem. There is a variable in the watch window, the problem disappears after I deleting the variable in the watch window. Thanks.
Encountered the same, solved by removing all breakpoints.
@tomatac Do you have expressions in the watch Window that when evaluated could cause your program to crash when evaluated? @WardenGnaw Do you think this could be a C/C++ debugger bug?
I encountered the same problem. There is a variable in the watch window, the problem disappears after I deleting the variable in the watch window. Thanks.
I can confirm I had a variable in the watch window that I hadn't added there, and deleting it fixed the issue.
I can confirm I had a variable in the watch window that I hadn't added there, and deleting it fixed the issue.
Same here. Should it be re opened? Watching an non-exist variable should not lead to segmentation fault and interruprt the debugger.
I can confirm I had a variable in the watch window that I hadn't added there, and deleting it fixed the issue.
Same here. Should it be re opened? Watching an non-exist variable should not lead to segmentation fault and interruprt the debugger.
I agree that it should be reopened. I spent a long time trying to find what's wrong.
Bug type: Debugger
Describe the bug
To Reproduce Please include a code sample and
launch.json
configuration. Steps to reproduce the behavior:Do you have any suggestions to troubleshoot this issue?
Additional context
Running within a container. See also: https://github.com/microsoft/vscode-dev-containers/issues/827