How to debug C code with GDB in VSCode (Linux)

preview_player
Показать описание
1. Check gdb command
2. Install VSCode C/C++ extension and reload editor
3. Create debug configuration and set executable path
4. Set breakpoints in your code
5. Debug it!
Рекомендации по теме
Комментарии
Автор

ive been searching for a while and i got no clue why this video helped me but now its working and im only 3 minutes into the video xd

Qemuel
Автор

thank you so much.

i had to add this command line in the launch.json file


"miDebuggerPath": "C:/Program Files (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/bin/gdb.exe",

diversiones
Автор

Bro how to debug user input c code in vs code my vs code debugger stop at scanf function and then nothing happened ..then i need to close the debugger and run again but same it doesn't respond to scanf function where should i give input in deugger

rishabhsonkar
Автор

The video is great but add voice to it so that you can grab more subscribers

deeppatel
Автор

so in the debug mode, where does printf output go?

hamidnajafi
Автор

Any way to watch function return value? Very useful for evaluating recursive functions

menachemporter
Автор

what is the variable for getting the folder name where my .c file resides. I have some folders inside my workspaceFolder and I've kept my source files inside them

Utshaw