Top

Debugger Commands


The commands described here may be used in the "Command" textfield of the debugger control dialog. The debugger must actually be running first; use Alt X, jdb, without any arguments, to start it.

If you're working in an editor source window, you can use Alt X, "jdb [command]" to send a command to the running instance of the debugger (for example, Alt X, "jdb continue", or Alt X, "jdb restart"). Several frequently used debugger commands are also available on the right-button context menu in Java source buffers.

Any command may be shortened to the first few letters of its name, as long as the abbreviation is unambiguous.

Certain frequently used commands may be invoked with their first letter, even if there are other commands that start with the same letter (e.g. continue, step).

The continue, next and step commands may be repeated by just pressing Enter in the "Command" textfield.

break

Sets a breakpoint.

Syntax:

        break filename:linenumber
        break class.method
Examples:
        b Lisp.java:138
        b org.armedbear.lisp.Main.main

Aliases: stop

Abbreviation: b

clear

Clears a breakpoint.

Syntax:

        clear filename:linenumber
        clear class.method
Example:
        clear Lisp.java:138
clear all

Clears all breakpoints.

continue

Resumes execution at the address where the program last stopped.

Aliases: go, resume

Abbreviation: c

finish

Continues execution until just after the current method returns.

Aliases: step out

Abbreviation: f

go

Resumes execution at the address where the program last stopped.

Alias for: continue

locals

Displays values for all of the local variables in the current stack frame.

Aliases: None

next

Executes the current line of code, stepping over method calls.

Syntax:

        next
        next count
Examples:
        n
        n 5

Aliases: None

Abbreviation: n

print

Prints the value of a variable.

Syntax:

        print expr
Examples:
        p foo
        p foo.bar

Aliases: None

Abbreviation: p

quit

Terminates the debugger, closes the control dialog and kills the transcript buffer. (If you want to keep the transcript, copy it somewhere before quitting.)

Aliases: None

Abbreviation: q

resume

Resumes execution at the address where the program last stopped.

Alias for: continue

stdin

Sends argument to stdin of debuggee.

Syntax:

        stdin string
Examples:
        stdin (+ 1 2)

Aliases: None

step

Executes the current line of code, stepping into any method calls it may contain.

Syntax:

        step
        step count
Examples:
        s
        s 3

Aliases: None

Abbreviation: s

step out

Continues execution until just after the current method returns.

Alias for: finish

stop

Sets a breakpoint.

Syntax:

        stop filename:linenumber
        stop class.method
Examples:
        stop Lisp.java:138
        stop org.armedbear.lisp.Main.main

Alias for: break

suspend

Suspends execution of the application.

Aliases: None

tbreak

Sets a temporary breakpoint.

Syntax:

        tbreak filename:linenumber
        tbreak class.method
Examples:
        tbreak Lisp.java:138
        tbreak org.armedbear.lisp.Main.main

Aliases: None