VSCode using CMake to launch gdb with program command line arguments
- Open this directory in VS Code
- Run the VS Code task "CMake: Configure" which will create a directory
buildand runcmakein it - Open
helloworld.cppin a VSCode editor - Run the task defined in launch.json "(gdb) Launch"
- The debugger launches, pulling information from CMake, and command line parameters are pulled from
launch.json
https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/debug-launch.md#gdb