Running Locally

After downloading gdbgui, you can launch it like so:

See more examples when launching here.

A new tab in your browser will open with gdbgui in it. If a browser tab did not open, navigate to the ip/port that gdbgui is being served on (i.e. http://localhost:5000).

Now that gdbgui is open, you can interactively run a program with it.

For a list of gdbgui arguments, see the Arguments section below or type gdbgui --help.

Running gdbgui Remotely

Because gdbgui is a server, it naturally allows you to debug programs running on other computers.

Connecting to gdbserver

Like gdb, gdbserver is also made by gnu, but with the following important differences:

gdbserver runs on a remote machine or embedded target, which, as the name suggests, runs a server. gdb communicates with gdbserver so you can debug on your local machine. To do this, the remote machine must run the server and program:

gdbserver mybinary.a

Then you can launch gdb or gdbgui and connect to it. In gdbgui, use the dropdown to select Connect to gdbserver, and enter

<remote ip address>:9000

Read more at the gdbserver homepage.


gdbgui settings can be accessed by clicking the gear icon in the top right of the frontend. Most of these settings persist between sessions for a given url and port.

Keyboard Shortcuts

The following keyboard shortcuts are available when the focus is not in an input field. They have the same effect as when the button is pressed.

Debugging Faults

If your program exits unexpectedly from something like a SEGFAULT, gdbgui displays a button in the console to re-enter the state the program was in when it exited. This allows you to inspect the stack, the line on which the program exited, memory, variables, registers, etc.

Command line API

This is the output of the commandgdbgui -horgdbgui --help

usage: gdbgui [-h] [-p PORT] [--host HOST] [-r] [-g GDB] [--rr] [--lldb] [-v]
              [--hide_gdbgui_upgrades] [--debug] [-n] [-x GDB_CMD_FILE]
              [--args ARGS [ARGS ...]] [--auth-file AUTH_FILE] [--user USER]
              [--password PASSWORD] [--license LICENSE] [--key KEY]
              [--cert CERT] [--project PROJECT]
              [cmd [cmd ...]]

A server that provides a graphical user interface to the gnu debugger (gdb).

positional arguments:
  cmd                   (Optional) The binary and arguments to run in gdb.
                        This is a way to script the intial loading of the
                        inferior binary you wish to debug. For example gdbgui
                        './mybinary myarg -flag1 -flag2'

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  The port on which gdbgui will be hosted. Defaults to
  --host HOST           The host ip address on which gdbgui serve. Defaults to
  -r, --remote          Shortcut to sets host to and suppress browser
                        from opening. This allows remote access to gdbgui and
                        is useful when running on a remote machine that you
                        want to view/debug from your local browser, or let
                        someone else debug your application remotely.
  -g GDB, --gdb GDB     Path to gdb or lldb executable. Defaults to gdb. lldb
                        support is experimental.
  --rr                  Use `rr replay` instead of gdb. Replays last recording
                        by default. Replay arbitrary recording by passing
                        recorded directory as an argument. i.e. gdbgui
                        /recorded/dir --rr. See
  --lldb                Use lldb commands (experimental)
  -v, --version         Print version
                        Hide messages regarding newer version of gdbgui.
                        Defaults to False.
  --debug               The debug flag of this Flask application. Pass this
                        flag when debugging gdbgui itself to automatically
                        reload the server when changes are detected
  -n, --no_browser      By default, the browser will open with gdb gui. Pass
                        this flag so the browser does not open.
  -x GDB_CMD_FILE, --gdb_cmd_file GDB_CMD_FILE
                        Execute GDB commands from file.
  --args ARGS [ARGS ...]
                        (Optional) The binary and arguments to run in gdb.
                        Example: gdbgui --args "./mybinary myarg -flag1
  --auth-file AUTH_FILE
                        (Optional) Require authentication before accessing
                        gdbgui in the browser. Specify a file that contains
                        the HTTP Basic auth username and password separate by
                        newline. NOTE: https is enabled by provided an ssl and
  --user USER           (Optional) Username when authenticating
  --password PASSWORD   (Optional) Password when authenticating
  --license LICENSE     (Optional) Store gdbgui premium license key.
  --key KEY             SSL private key. Generate with:openssl req -newkey
                        rsa:2048 -nodes -keyout host.key -x509 -days 365 -out
  --cert CERT           SSL certificate. Generate with:openssl req -newkey
                        rsa:2048 -nodes -keyout host.key -x509 -days 365 -out
  --project PROJECT     Set the project directory. When viewing the "folders"
                        pane, paths are shown relative to this directory.