ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ROS debugging in VS code C++

asked 2019-05-10 14:36:35 -0600

murali1842 gravatar image

Is VS code is a good IDE for ROS development in C++? Anybody have an good cpp_properties, launch.json and tasks.json files to share? How to overcome the following error: -- "fatal error: ros/ros.h: No such file or directory"

edit retag flag offensive close merge delete


Strictly speaking, VS Code isn't an IDE like Visual Studio, Eclipse, etc. but rather a very flexible text editor that can be extended to function similarly to an IDE. I'm only saying this because I've found it to be difficult to enable debugging in VS Code and actually switch to an IDE for debugging or use something like gdb from the terminal. If you can get it to debug C++ then I can't imagine it would be much more difficult to get it to work with ROS.

jayess gravatar image jayess  ( 2019-05-10 17:06:09 -0600 )edit

this is likely to be a CMakeLists.txt problem, where you could have forgotten to include the required directories

ignacio gravatar image ignacio  ( 2021-04-16 06:05:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-04 04:41:27 -0600

ticotico gravatar image

There are nice tutorials & descriptions for using VS Code for ROS, see:

  • VS Code Extension (including video): Link
  • Setup Debugging for C++ or Python: Link

This should get you started...have fun!

edit flag offensive delete link more

Question Tools



Asked: 2019-05-10 14:36:35 -0600

Seen: 2,649 times

Last updated: Jan 04 '21