You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/docs/get_backtrace.rst
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,10 @@ While we could set this up through the commandline, we can instead make use of t
134
134
In your launch file, find the node that you're interested in debugging.
135
135
For this section, we assume that your launch file contains only a single node (and potentially other information as well).
136
136
The ``Node`` function used in the ``launch_ros`` package will take in a field ``prefix`` taking a list of prefix arguments.
137
-
We will insert the same GDB snippet here as used in our node example.
137
+
We will insert the GDB snippet here with one change from our node example, use of ``xterm``.
138
+
``xterm`` will pop up a new terminal window to show and interact with GDB.
139
+
We do this because of issues handling ``stdin`` on launch files (e.g. if you hit control+C, are you talking to GDB or launch?).
140
+
See `this ticket <https://github.com/ros2/launch_ros/issues/165>`_ for more information.
138
141
See below for an example debugging SLAM Toolbox.
139
142
140
143
.. code-block:: python
@@ -147,15 +150,12 @@ See below for an example debugging SLAM Toolbox.
147
150
package='slam_toolbox',
148
151
executable='sync_slam_toolbox_node',
149
152
name='slam_toolbox',
150
-
prefix=['gdb -ex run --args'],
153
+
prefix=['xterm -e gdb -ex run --args'],
151
154
output='screen')
152
155
153
-
Just as before, this prefix will launch a GDB session and run the launch file you requested with all the additional launch arguments defined.
156
+
Just as before, this prefix will launch a GDB session, now in ``xterm`` and run the launch file you requested with all the additional launch arguments defined.
154
157
155
-
.. note::
156
-
As of ROS2 Foxy, there may be an issue with ``prefix`` in launch files not returning ``gdb`` prompts after a crash. See `this ticket <https://github.com/ros2/launch_ros/issues/165>`_ for more information.
157
-
158
-
Once your server crashes, you'll see a prompt like below. At this point you can now get a backtrace.
158
+
Once your server crashes, you'll see a prompt like below, now in the ``xterm`` session. At this point you can now get a backtrace.
0 commit comments