Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.8 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.8 KB

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.