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 in The Tramp Manual, 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 in The GNU debugger).