I want to know where to put command line arguments in VS Code for C. I know in Visual studio you can hit the project and add the command line arguments, but I do not know how to do that in VS Code.
{
"name": "C Launch",
"request": "launch",
"program": "${workspaceFolder}/a.out",
"args": ["arg1", "arg2"],
"cwd": "${workspaceFolder}"
}
put the above line in the .vscode/launch.json file in your working directory. Be sure to replace a.out with your name of program.
For further details check here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With