Java Reference
In-Depth Information
stop in <class id>.<method>[(argument_type,...)] -- set a breakpoint in a method
stop at <class id>:<line> -- set a breakpoint at a line
up [n frames] -- move up a thread's stack
down [n frames] -- move down a thread's stack
clear <class id>.<method>[(argument_type,...)] -- clear a breakpoint in a method
clear <class id>:<line> -- clear a breakpoint at a line
step -- execute current line
step up -- execute until current method returns to its caller
stepi -- execute current instruction
next -- step one line (step OVER calls)
cont -- continue execution from breakpoint
catch <class id> -- break for the specified exception
ignore <class id> -- ignore when the specified exception
list [line number|method] -- print source code
use [source file path] -- display or change the source path
memory -- report memory usage
gc -- free unused objects
load classname -- load Java class to be debugged
run <class> [args] -- start execution of a loaded Java class
!! -- repeat last command
help (or ?) -- list commands
exit (or quit) -- exit debugger
main[1] exit
$
Other debuggers are available; some of them can even work remotely because the Java De-
bugger API (which the debuggers use) is network based. Most IDEs feature their own debug-
ging tools; you may want to spend some time becoming familiar with the tools in your
chosen IDE.
Avoiding the Need for Debuggers with Unit Testing
Problem
You don't want to have to debug your code.
Search WWH ::




Custom Search