Skip to content

Simple repository that contains the setup needed to debug a C++ file with both the GDB and LLDB debuggers.

Notifications You must be signed in to change notification settings

rickstaa/vscode-cpp-debug-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Vscode C++ debug example

Simple repository that contains the setup needed to debug a C++ file with both the GDB and LLDB debuggers. More information can be found here.

Clang-tidy

To use clang-tidy you currently have to install the clang-tidy extension since this feature has not yet been implemented in the C++ extension (see vscode-cpptools/issues/2908).

Catkin workspace

You have to install the catkin-tools extension to get all the intellisense, linting and formatting features to work. After you enabled this extension you have to add the following settings to your settings.json file:

"catkin_tools.mergedCompileCommandsJsonPath": "${workspaceFolder}/compile_commands.json",
"catkin_tools.recursiveHeaderParsingEnabled": true,
"C_Cpp.default.configurationProvider": "b2.catkin_tools",

You further have to set the DCMAKE_EXPORT_COMPILE_COMMANDS and DCMAKE_BUILD_TYPE flags your catkin workspace config:

catkin config --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug

For more information see the extension documentation. here and here.

ROS packages

If you also want to debug ROS packages you can install the vscode-ros.

About

Simple repository that contains the setup needed to debug a C++ file with both the GDB and LLDB debuggers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages