Debugging C/C++ with Visual Studio Code

preview_player
Показать описание
Shows how to debug C/C++ using gdm in VS Code.
In this case, demonstrated from linux.

Рекомендации по теме
Комментарии
Автор

I spent hours trying to figure out the VS Code Debugging configuration on my own and was left with nothing but frustration. Numerous web searches were unproductive as well. I am so glad I found this video. Your simple narrative was just what I needed. Wish I had found this earlier, but I'm "over the top" that I'm now on my way and can get back to debugging my projects. THANK YOU!!!

johnkile
Автор

Thank you. Was wasting hours trying to make this work. Much appreciated.

ahnaffaiyaz
Автор

Awesome video! It helped a lot! I am actually working with a codebase in C for embedded systems and some grad school projects in C++. This eliminates the need for me to use CLion. Visual Studio Code is definitely one of Microsofts best kept secrets. I also use Linux so this was definitely an amazing tutorial. Thanks!

MalamIbnMalam
Автор

can you show us how to make the debugger recompile the executable each time?

mito._
Автор

Thank you! After hours googling how to use the debugger, this video fixed my problem in under 10 minutes :)

jialincai
Автор

Thanks for this short video - it did exactly what the videos title said it would do :D

JavArButt
Автор

Another tip for vscode you can do ctrl+shift+p, task, create build task and you can do a build task to compile the code for you.

nobytes
Автор

even much clearer than VS code offical tutorial

jiachuandeng
Автор

Thanks a lot for this video, I have been looking up how to do this for a while now.

sparshtemani
Автор

you the man bro! thanks for the debugger help

CastleBomber
Автор

I've been trying to set the debugger up to use it in Visual Studio code with C with my mac.
The problem I find is when I get to a scanf(), I just don't know where or how to input the value. My terminal is not running the program and in the debug console I get an error msg if I try to input the value there.
Any help with this would be really appreciated. Thanks!

talentotech-pe
Автор

Thanks you for this content. Although its simplicity, it was very useful.

felipexg
Автор

is the code runner extension required because I find no mention of it in the vscode link you provided, only C/C++ extension and the mingW installation are mentioned .

edwardmacnab
Автор

Suppose I don't have the .cpp source file but only the binary "a.out", which is already running. Is there a way for me to monitor the variables and expressions after attaching the debugger to the a.out process?

rjeejacobjacob
Автор

Looks like C++ is not supported in Visual Studio for mac. What is the best debugger for a Mac OS based machine?

ameynaik
Автор

Please help me. I have error when I debug "which has no line number information". How to fix this?

giangnguyentruong
Автор

Cool ! Working good. Can you execute gdb commands from the terminal though? To do memory debugging.

xamogxusx
Автор

How do I add the linker for library in c++ in vscode . I want to able to play audio files using the lwinmm lib

rajeshpawar
Автор

Thank you soooo much! I was trying to debug my c++ project and it just was not working. Turns out I forgot to compile it using -g 😢, but thanks for the help!!

smzsscu
Автор

How would one do this for a C app that compiles with a Makefile?

andreasellsen