1
\page debugging Debugging
3
## Using GDB with the command line tools
5
The Gazebo command line tools are based on Ruby. If you want to use GDB to
6
debug a problem, which we highly encourage, then you'll need to run GDB against
7
the Ruby executable. Once in the GDB shell, you can run the `ign gazebo`
8
script to run an instance of Gazebo.
10
You'll likely want to debug the Gazebo server or GUI separately. Refer to the
11
following two sections for instructions concerning each case.
13
### Debugging the server
15
1. Find the `ign` executable:
19
The following instructions will assume the output was `/usr/bin/ign`, be
20
sure to change it accordingly.
26
3. Run the Gazebo server with the desired arguments. Make sure to use the
27
`-s` argument. The following example runs the `shapes.sdf` world.
29
`(gdb) r /usr/bin/ign gazebo -s shapes.sdf`
39
2. Run the Gazebo GUI with the desired arguments. Make sure to use the
42
`(gdb) r /usr/bin/ign gazebo -g`
44
3. In another terminal run the Gazebo server.
46
`ign gazebo -s -v 4 -r shapes.sdf`