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

Revision history [back]

click to hide/show revision 1
initial version

There might be other ways but this is one I know:

  1. Go into your workspace and show hidden folders (ctrl+h)
  2. There is folder called .catkin_tools, and a sub folder called profiles. Go into profiles and make a copy of your default profile. Call it debug (or anything you like). Go into debug and change build.yaml and config.yaml to not to have build and devel but to have debug_devel and build_devel (again you can name them anything).build_space: build_debug & devel_space: devel_debug.
  3. Then build your package in debug mode add a flag when building CMAKE_BUILD_TYPE=debug.
  4. When it's built, source devel_debug/setup.bash and run your node.
  5. Then go into VSCode and debug mode (ctrl+shift+D), you will see green play button on top right press that, it will probably prompt to launch a json, open it and configure it for your python node see here.
  6. Once configured you can chose that configuration and press play button it will pop-up a list of available process to link against, select your node from it, it will ask for password and then you can debug.
  7. It seems lengthy but most of it is just one time configuration thing, once that is done you can change node name and path in configuration to work with any other python node. Hope this helps.

There might be other ways but this is one I know:

  1. Go into your workspace and show hidden folders (ctrl+h)
  2. There is folder called .catkin_tools, and a sub folder called profiles. Go into profiles and make a copy of your default profile. Call it debug (or anything you like). Go into debug and change build.yaml and config.yaml to not to have build and devel but to have debug_devel and build_devel (again you can name them anything).build_space: build_debug & devel_space: devel_debug.
  3. Then build your package in debug mode add a flag when building CMAKE_BUILD_TYPE=debug.
  4. When it's built, source devel_debug/setup.bash and run your node.
  5. Then go into VSCode and debug mode (ctrl+shift+D), you will see green play button on top right press that, it will probably prompt to launch a json, open it and configure it for your python node see here.
  6. Once configured you can chose that configuration and press play button it will pop-up a list of available process to link against, select your node from it, it will ask for password and then you can debug.

It seems lengthy but most of it is just one time configuration thing, once that is done you can change node name and path in configuration to work with any other python node. Hope this helps.