Robotics StackExchange | Archived questions

ROS debugging in VS code C++

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"

Asked by murali1842 on 2019-05-10 14:36:35 UTC

Comments

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.

Asked by jayess on 2019-05-10 17:06:09 UTC

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

Asked by ignacio on 2021-04-16 06:05:52 UTC

Answers

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!

Asked by ticotico on 2021-01-04 05:41:27 UTC

Comments