Java Debugger Tutorial|Java Debugger Techniques
Java Debugger Tutorial|Java Debugger Techniques
The basic Java debugger is very similar to gdb and the commands it under-
stands.3 The command to launch is jdb StartClass and it launches a second
JVM to debug the program that waits for continued execution. Breakpoints can
be set by using stop at AClass:aLineNumber or stop in aCompleteMethod-
Name, or stop in AClass.
AClass.
next advances to the next line.
step advances to the next line within current scope.
run starts execution.
cont continues execution after a breakpoint has been found.
print prints values of the subsequent fields/method calls.
dump is more complete with all values of fields dumped.
threads lists the number of threads.
thread selects the thread with number indicated afterwards.
where dumps the stack.
where all dumps all the stacks.
catch can catch an exception on-the-fly.