Skip to content

Instantly share code, notes, and snippets.

@joshcarp
Created April 3, 2020 10:40
Show Gist options
  • Save joshcarp/b6de5fff200cf288933edae93a90cf0c to your computer and use it in GitHub Desktop.
Save joshcarp/b6de5fff200cf288933edae93a90cf0c to your computer and use it in GitHub Desktop.
c debugger
{
"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",
}
]
}
@joshcarp
Copy link
Author

joshcarp commented Apr 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment