We are excited to introduce an update for the VS Code extension for ROS! This update brings the extension to Windows, adds coverage for workspaces built with catkin_make_isolated, and updates the ROS Core monitor. More capabilities like local debugging and URDF rendering are coming in future iterations.
I’m really appreciated to you for reviving this plugin.
I was developing a side-project for the same plugin, focusing on the roslaunch debugging. That is, it would be enormously useful to have a one-click debugging session initialization on several nodes ignited by the launch file.
Meantime, thank you so much for the valuable feedback! This will be something that we plan to work on, and we will be tracking the progress through the debug ROS nodes with vscode-ros project.
An integration of VS Code and ROS2 + colcon will be something that we plan to investigate and work on, and we will be tracking the progress through the ROS2 for VS Code project.
Here are my findings and the naïve method for allowing multi-node debugging:
Since roslaunch.py spawns nodes as child processes, we might not be able to interfere on that level.
One can fetch the names of all nodes (including rosout) before roslaunch actually initiates the nodes. However, since I have noted that interfering to roslaunch code would be very comlicated (or even impossible perhaps) attaching to the spawned nodes seems only solution. ROS QTC Plugin follows a similar pipeline and allows the user to choose nodes for attachment by the debugger.
VS Code’s Debug Adapter Protocol seem to support multi-session configuration. However, this requires certain ports to be allocated for the nodes.
Attaching to C++ programs are trivial. however attaching to Python programs require following snippet to be placed in the beginning of the debuggee program:
If there exists a successful debugging tool for a similar scenario in which many processes are spawned within a script, it would be very beneficial to inspect it. I couldn’t find but I didn’t make a lot of research either.