Is there a way to run a rostest with the gdb debugger?
I'm trying to port my ROS code to using the newer ROS Kinetic. I have a Docker container with Ubuntu 16.04, which I have ROS Kinetic setup. There is one particular unit test (involving the use of ActionLib) which now fails, giving me the following error:
C++ exception with description "std::bad_alloc" thrown in the test fixture's constructor.
I want to debug this by connecting the gdb debugger and setting a break point on std::bad_alloc::bad_alloc
constructor. The test is defined in my CMakeLists in a add_rostest_gtest()
call. This is my launch file:
<launch>
<test test-name="transition_query_client_test" pkg="intra_sector_planner" type="transition_query_client_test" />
</launch>
I've tried adding output="screen" launch-prefix="xterm -e gdb --args"
but I get an error saying I cannot use the output
tag with the test
tag.
Is this possible?
Have you tried it without the
output="screen"
?I have not... I thought I read somewhere that
output="screen"
was necessary for gdb. I'll give it a try though. :SYou are correct! Thank you for that.