Example 516 The Java debugger help command output

$ jdb GetUser Initializing jdb ... > help

■ start execution of application's main class threads [threadgroup] thread <thread id> suspend [thread id(s)j resume [thread id(s)j where [thread id] | all wherei [thread id] | all up [n frames] down [n frames] kill <thread> <expr> interrupt <thread>

- list threads

- set default thread

- suspend threads (default: all)

- resume threads (default: all)

- dump a thread's stack

- dump a thread's stack, with pc info move up a thread's stack

- move down a thread's stack

- kill a thread with the given exception object

- interrupt a thread print <expr> dump <expr>

- print value of expression - print all object information eval <expr> - evaluate expression (same as print)

set <lvalue> = <expr> - assign new value to field/variable/array element locals - print all local variables in current stack frame classes - list currently known classes class <class id> - show details of named class methods <class id> - list a class's methods fields <class id> - list a class's fields threadgroups - list threadgroups threadgroup <name> - set current threadgroup stop in <class id>.<method>[(argument_type,...)]

- set a breakpoint in a method stop at <class id>:<line> - set a breakpoint at a line clear <class id>.<method>[(argument_type,...)]

- clear a breakpoint in a method clear <class id>:<line> - clear a breakpoint at a line clear - list breakpoints catch [uncaught|caught|all] «exception-class id>

- break when specified exception occurs ignore [uncaught|caught|all] «exception-class id>

- cancel 'catch' for the specified exception watch [access|all] <class id>.<field name>

- watch access/modifications to a field unwatch [access|all] <class id>.<field name>

- discontinue watching access/modifications to a field trace methods [thread] - trace method entry and exit untrace methods [thread] - stop tracing method entry and exit step - execute current line step up - execute until the current method returns to its caller stepi - execute current instruction next - step one line (step OVER calls)

cont - continue execution from breakpoint list [line number|method] - print source code use (or sourcepath) [source file path]

- display or change the source path exclude [class id ... | "none"]

- do not report step or method events for specified classes classpath - print classpath info from target VM

monitor <command> - execute command each time the program stops monitor - list monitors unmonitor <monitor#> - delete a monitor read <filename> - read and execute a command file lock <expr> - print lock info for an object threadlocks [thread id] - print lock info for a thread pop - pop the stack through and including the current frame reenter - same as pop, but current frame is reentered redefine <class id> <class filename>

- redefine the code for a class disablegc <expr> - prevent garbage collection of an object enablegc <expr> - permit garbage collection of an object

!! - repeat last command

<n> <command> - repeat command n times help (or ?) - list commands version - print version information exit (or quit) - exit debugger

<class id> or «exception-class id>: full class name with package qualifiers or a pattern with a leading or trailing wildcard ('*') NOTE: any wildcard pattern will be replaced by at most one full class name matching the pattern.

«thread id>: thread number as reported in the 'threads' command <expr>: a Java(tm) Programming Language expression. Most common syntax is supported.

Startup commands can be placed in either "jdb.ini" or ".jdbrc" in user.home or user.dir

Was this article helpful?

0 0

Post a comment