Upload
hanna-wolf
View
18
Download
0
Embed Size (px)
DESCRIPTION
Ilaria Bartolini. Java Debug (jdb). ** DEBUG command list ** threads [threadgroup] -- list threads thread -- set default thread suspend [thread id(s)] -- suspend threads(default:all) resume [thread id(s)] -- resume threads(default:all) - PowerPoint PPT Presentation
Citation preview
Java Debug (jdb)Java Debug (jdb)
Ilaria BartoliniIlaria Bartolini
** DEBUG command list **** DEBUG command list **
threadsthreads [threadgroup] -- list threadsthreadthread <thread id> -- set default threadsuspendsuspend [thread id(s)] -- suspend threads(default:all)resumeresume [thread id(s)] -- resume threads(default:all)wherewhere [thread id] | all -- dump a thread's stackwhereiwherei [thread id] | all -- dump a thread's stack, with
pc infothreadgroups threadgroups -- list threadgroupsthreadgroupthreadgroup <name> -- set current threadgroup
printprint <id> [id(s)] -- print object or fielddumpdump <id> [id(s)] -- print all object information
localslocals -- print all local variables in current stack frame
Java Debug (jdb)Java Debug (jdb)
Ilaria BartoliniIlaria Bartolini
classesclasses -- list currently known classesmethods <class id>methods <class id> -- list a class's methodsstop in <class id>.<method>[(argument_type,...)]stop in <class id>.<method>[(argument_type,...)]
-- set a breakpoint in a methodstop at <class id>:<line>stop at <class id>:<line>-- set a breakpoint at a lineup [n frames]up [n frames] -- move up a thread's stackdown [n frames]down [n frames] -- move down a thread's stackclear <class id>.<method>[(argument_type,...)]clear <class id>.<method>[(argument_type,...)]
-- clear a breakpoint in a methodclear <class id>:<line>clear <class id>:<line> -- clear a breakpoint at a linestep step -- execute current linestep upstep up -- execute until the current
method returns to its callerstepi stepi -- execute current instructionnext next -- step one line (step OVER calls)contcont -- continue execution from
breakpoint
Java Debug (jdb)Java Debug (jdb)
Ilaria BartoliniIlaria Bartolini
catch <class id>catch <class id> -- break for the specified exception
ignore <class id>ignore <class id> -- ignore when the specified exceptionexceptionlist [line number|method]list [line number|method] -- print source codeuse [source file path]use [source file path] -- display or change the source
pathmemorymemory -- report memory usagegcgc -- free unused objectsload classnameload classname -- load Java class to be debuggeddebuggedrun <class> [args]run <class> [args] -- start execution of a loaded
Java class!! -- repeat last command
help (or ?)help (or ?) -- list commandsexit (or quit)exit (or quit) -- exit debugger