Code Completion
https://medium.com/@junbs95/code-completion-and-debugging-for-ros2-in-vscode-a4ede900d979
Debugger
You need to have a .vscode folder with the following configuration
-
c_cpp_properties.json
-
settings.json
-
launch.json
- This file contains debugger settings and helps to specify command-line arguments for debugging.
- You will mostly use this file for executing launch files with the debugger.
-
tasks.json
To run the
colcon
command from VSCode, you need to create the filetasks.json
within the .vscode folder and populate it with the following content:
Note
-
When you start debugging, if your breakpoints aren’t bound (solid red circle) or they are not being hit, you may need to enable debug symbols during compilation.
add_compile_options(-g)