0
$\begingroup$

Rosanswers logo

Hi

Coming from a matlab background, Im very found of using breakpoints for debugging...

I know this can be done for python, but it doesn't seem to work when launching my node with roslaunch. If I use rosrun (or roslaunch with screen output) my node is flooded with sensor data, which overwrites anything I would write as part of my breakpoint debugging. Does anyone have any suggestions?


Originally posted by Oevli on ROS Answers with karma: 30 on 2015-11-26

Post score: 0


Original comments

Comment by chenhengwei1999 on 2023-06-29:
Hi. I have the same question. Did you find the solution about how to debug rospy code? I will appreciate your reply.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You should be able to use a launch-prefix to get your python process into pdb

http://wiki.ros.org/roslaunch/Tutorials/Roslaunch%20Nodes%20in%20Valgrind%20or%20GDB


Originally posted by tfoote with karma: 58457 on 2015-11-26

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by chenhengwei1999 on 2023-06-29:
Hi, I read your link which is helpful to debug ros's code. But the documentation you supplied is about roscpp, is there any debugging tools that is for rospy?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.