Created
April 3, 2020 10:40
-
-
Save joshcarp/b6de5fff200cf288933edae93a90cf0c to your computer and use it in GitHub Desktop.
c debugger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(gdb) Launch", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${workspaceRoot}/bin/client.o", // Path to your executable, DONT INCLUDE ARGS | |
"args": ["google.com"], // Arguments here as strings, seperated: ["arg1", "arg2"] | |
"cwd": "${workspaceFolder}", | |
"MIMode": "lldb", | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to .vscode/launch.json and edit the program.args
Also make sure you're using the -g flag with gcc:
gcc -g main.c -o main