Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Debugging ros2 launch file #567

Closed
mnissov opened this issue Sep 30, 2021 · 10 comments
Closed

[feature] Debugging ros2 launch file #567

mnissov opened this issue Sep 30, 2021 · 10 comments
Assignees

Comments

@mnissov
Copy link

mnissov commented Sep 30, 2021

I see a lot of content regarding how one can setup vscode for debugging a ros node. Is it possible to debug the launch file itself?

This may not have been so interesting in ros1, but in ros2 with the added complexity of the python launch file format I feel it could be useful if it doesn't yet exist. In short, is it currently possible to debug the launch file itself in ros2 foxy and if so how?

Using: ros2 foxy and Ubuntu 20.04 LTS.

@ooeygui
Copy link
Member

ooeygui commented Nov 13, 2021

I'll look into it - I don't see why this can't be supported.

@ooeygui ooeygui changed the title Debugging ros2 launch file [Feature Request] Debugging ros2 launch file Nov 13, 2021
@ooeygui ooeygui changed the title [Feature Request] Debugging ros2 launch file [feature] Debugging ros2 launch file Nov 13, 2021
@MTDzi
Copy link

MTDzi commented Feb 11, 2022

Hey @ooeygui, any updates on this?

@ooeygui
Copy link
Member

ooeygui commented Feb 11, 2022

@MTDzi Thanks for checking - it is a super useful feature, but I have not started looking at it. I'd be happy to collaborate if someone wants to take a crack at this.

@CM134
Copy link

CM134 commented Mar 24, 2023

Hey, I am just checking in. Are there now ways to debug launch files in ros2? (using humble)

@ooeygui
Copy link
Member

ooeygui commented Mar 24, 2023

Thanks for the interest in this :-)

I'm working on it in https://github.com/ms-iot/vscode-ros/tree/feature/debug_launch_files.

I might split this into two work items - one which is about debugging the launch file itself, without launching the ROS nodes; and the second which launches them as well.

@ooeygui
Copy link
Member

ooeygui commented May 4, 2023

We now support debugging the launch file itself - although it does not actually launch ROS nodes at the moment.

@ooeygui ooeygui closed this as completed May 4, 2023
@martinakos
Copy link

I'm trying to debug a launch_test file, which is similar to a launch file. Would it work using this feature?

@ooeygui
Copy link
Member

ooeygui commented Aug 30, 2023

I'm trying to debug a launch_test file, which is similar to a launch file. Would it work using this feature?

Hi there,
Can you post a link to a sample of your launch file?
This currently works with python based launch files.

@martinakos
Copy link

The launch_test file I use is of this type
https://github.com/ros2/launch_ros/blob/rolling/launch_testing_ros/test/examples/talker_listener_launch_test.py
This is to run integration tests, launching nodes like in a launch.py file but you can perform some tests on the outputs of the nodes.

The test can be run like this
launch_test launch_testing_ros/test/examples/talker_listener_launch_test.py

it would be great if I could put breakpoints either in the tests or in the nodes code and step through with vscode.

@ooeygui
Copy link
Member

ooeygui commented Aug 31, 2023

@martinakos Thanks for the clarification. Yes, you can debug the tests themselves. I have a video on setting up launch debugging. https://www.youtube.com/watch?v=A6ABRdL0ckg&feature=youtu.be.

ROS Test is set up similarly, although I don't have a video on it.

(This feature is about walking through launch files without actually launching ROS Nodes)

I'll create an issue for documenting test debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants