ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Update to the VS Code extension for ROS

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.

Huge thanks to @ajshort, the original author, for all the support along the way!

Note: This update to the extension is published as a new extension. Please uninstall the previous release to ensure no conflicts.

For feature requests and bug reports, please post in the ms-iot/vscode-ros repository. Let’s keep this project evolving just like ROS itself =)

For more details about this project and ROS on Windows, please check out http://aka.ms/ros.

7 Likes

@james

Great work!!! will give it a shot.

thanks,
Tomoya

1 Like

@james

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.

Thanks for your effort,
Tahsin

1 Like

This is fantastic to see!

Are there any plans to have this extension work with ROS 2 and Colcon workspaces?

1 Like

Thank you for the kind words, @tahsin_kose!

I have noticed your work in https://github.com/tahsinkose/vscode-ros/tree/roslaunch-debug earlier, and have been trying to learn as much as I can from it. That being said, it is still on my to-do list to fully go over all the code =)

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.

Thanks again,
James

Thank you for the feedback, @jhdcs!

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.

Thanks again,
James

Thanks for your delicate response @james.

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:

      import ptvsd
      ptvsd.enable_attach(address=('0.0.0.0', PORT_NO))
      ptvsd.wait_for_attach()
      ptvsd.break_into_debugger()
    

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.

1 Like

Does rosmon (http://wiki.ros.org/rosmon)) could help?

It is a roslaunch replacement that allows to start a debug session on any of the started nodes.

2 Likes

It seems great. I will try that.

Thanks for the suggestion, @rreignier!

I have not had much experience with this tool, and I will try to take a look =)