Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

How to Use

R. Bernstein edited this page · 13 revisions
Table of Contents

See also the notes for specific buffers:

Loading and Unloading

To load the package:

  M-x load-library realgud

To unload the package

  M-x realgud-unload-features

And, of course, to reload do an unload followed by a load.

Supported Debuggers

See Debuggers Supported for a list of debuggers that are supported.

When there is no conflict with command from another package like gud, there are function aliases to the names without realgud:. For example:

M-x trepan

is the same as

M-x realgud:trepan

This means gud, perldb, pdb, and jdb (among possibly others) need to have the realgud: prefix if you want the realgud to run these.

You can also attach a debugger tracking mode to an existing comint shell. Inside a shell buffer:

M-x realgud-track-mode

You will be asked for the name of a buffer. Use one of the names above without realgud-. For example, trepan.

For gdb, in order to track source automatically, inside gdb issue:

set annotate 1

History Ring

The debugger saves marks in a history ring at the places in source buffers that you have stopped at. To move around M-up and M-down in the debugger command buffer. (The command buffer is where you enter debugger commands which is attached to the debugger process. It is some sort of comint shell.

Short-key mode

There is a "short-key" mode which can be used in source buffers which allows single-keystroke commands, like "s" for step (into). And "n" for "next" or step through.

The short-key mode makes the source read only. To get out of short-key mode, you can use the insert key. To get back in use <Ctrl-insert>.

Editor marks in source buffer

The editor uses marks in the source buffer. However if you edit the program and then restart the debugger you may need to clear these marks with

M-x loc-change-clear-buffer

Backtrace buffer

I've been working on a backtrace buffer. To get that set up, issue from a debugger command window:

M-x realgud:backtrace-init

Or in a source buffer in short-key mode:

M-x realgud:window-bt 

which is by default bound to the key "F" (for frame).

Something went wrong with that request. Please try again.