How to debug C++ code in Visual studio code

為{幸葍}努か 提交于 2019-12-10 19:55:12

问题


Anyone using Visual studio code for programming in C++? Please tell me how can i manage to do the debugging of my code in visual studio code when I'm compiling it using g++ compiler.


回答1:


C++ Debugging requires a couple of steps to configure VSCode for it. Once done then C++ code can be easily debugged with F5.
I wrote a post which guides how to run and debug C/C++ files in VSCode.

https://medium.com/@jerrygoyal/run-debug-intellisense-c-c-in-vscode-within-5-minutes-3ed956e059d6




回答2:


To debug with the Visual C++ debugger, the code must be compiled with the Visual C++ compiler with debug symbols before you can debug. You can make a task.json to do this.

This resource and this resource may help.



来源:https://stackoverflow.com/questions/46060779/how-to-debug-c-code-in-visual-studio-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!