Next: , Up: Debuggers

27.6.1 Starting GUD

There are several commands for starting a debugger subprocess, each corresponding to a particular debugger program.

M-x gdb
Run GDB as a subprocess, and interact with it via an IDE-like Emacs interface. See GDB Graphical Interface, for more information about this command.
M-x gud-gdb
Run GDB, using a GUD interaction buffer for input and output to the GDB subprocess (see Debugger Operation). If such a buffer already exists, switch to it; otherwise, create the buffer and switch to it.

The other commands in this list do the same, for other debugger programs.

M-x perldb
Run the Perl interpreter in debug mode.
M-x jdb
Run the Java debugger.
M-x pdb
Run the Python debugger.
M-x guiler
Run Guile REPL for debugging Guile Scheme programs.
M-x dbx
Run the DBX debugger.
M-x xdb
Run the XDB debugger.
M-x sdb
Run the SDB debugger.

Each of these commands reads a command line to invoke the debugger, using the minibuffer. The minibuffer's initial contents contain the standard executable name and options for the debugger, and sometimes also a guess for the name of the executable file you want to debug. Shell wildcards and variables are not allowed in this command line. Emacs assumes that the first command argument which does not start with a ‘-’ is the executable file name.

Tramp provides a facility for remote debugging, whereby both the debugger and the program being debugged are on the same remote host. See Running a debugger on a remote host, for details. This is separate from GDB's remote debugging feature, where the program and the debugger run on different machines (see Debugging Remote Programs).