Building your workspace with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
which will create a file compile_commands.json
in your build/<pkg>
directory containing all compiler calls.
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
See images below
- Only tested with colcon, should work with catkin, catkin_make as well.
- Not tested for multiple packages in a workspace. Probably won't work.
Works with
catkin_make
as well