-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring VSCode Debugging for C
Rafael Pintar Alevato edited this page Sep 27, 2018
·
1 revision
Press 'Ctrl + shift + B' on windows/linux to “Configure Task Runner”.
Select “Others” after clicking to “Configure Task Runner”. It will create tasks.json file.
Change the following fields:
- "label": "Compile C",
- "command": "gcc -g my_c_file.c",
- Optional: add -o output_name to command
Add the following field after "command" to make 'Ctrl + shift + B' build this by default:
"group": {
"kind": "build",
"isDefault": true
}- First install the following extensions:
- C/C++
- C++ Intellisense
- Install LLDB on the computer
- Choose a folder with C files to debug
- Click to start debugging then choose C/C++
- Change the following fields:
- "name": "C Launch",
- "program": "enter program name, for example ${workspaceFolder}/a.out",
- "externalConsole": false,
- "MIMode": "lldb",
- Go to debug task and start C Launch