|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Debugger
Interface for any debugger implementation to be used by DrJava.
Nested Class Summary | |
---|---|
static class |
Debugger.StepType
|
Method Summary | |
---|---|
void |
addListener(DebugListener listener)
Adds a listener to this Debugger. |
void |
addWatch(String field)
Adds a watch on the given field or variable. |
DebugModelCallback |
callback()
|
Breakpoint |
getBreakpoint(int line,
String className)
Gets the Breakpoint object at the specified line in the given class. |
ArrayList<DebugStackData> |
getCurrentStackFrameData()
Returns a Vector of StackData for the current thread. |
ArrayList<DebugThreadData> |
getCurrentThreadData()
Returns a Vector of ThreadData. |
ArrayList<DebugWatchData> |
getWatches()
Returns all currently watched fields and variables. |
boolean |
hasRunningThread()
Returns whether the thread the debugger is tracking is now running. |
boolean |
hasSuspendedThreads()
|
boolean |
isAvailable()
Returns whether the debugger can be used in this copy of DrJava. |
boolean |
isCurrentThreadSuspended()
Returns whether the debugger's current thread is suspended. |
boolean |
isReady()
Returns whether the debugger is enabled. |
void |
removeAllWatches()
Removes all watches on existing fields and variables. |
void |
removeBreakpoint(Breakpoint breakpoint)
Removes a breakpoint. |
void |
removeListener(DebugListener listener)
Removes a listener to this Debugger. |
void |
removeWatch(int index)
Removes the watch at the given index. |
void |
removeWatch(String field)
Removes any watches on the given field or variable. |
void |
resume()
Resumes execution of the currently loaded document. |
void |
resume(DebugThreadData data)
Resumes execution of the given thread. |
void |
scrollToSource(Breakpoint bp)
Scrolls to the source indicated by the given Breakpoint |
void |
scrollToSource(DebugStackData data)
Scrolls to the source indicated by the given DebugStackData |
void |
setBreakpoint(Breakpoint breakpoint)
Sets a breakpoint. |
void |
setCurrentThread(DebugThreadData d)
Sets the current thread we are debugging to the thread referenced by d. |
void |
shutdown()
Disconnects the debugger from the Interactions JVM and cleans up any state. |
void |
startUp()
Attaches the debugger to the Interactions JVM to prepare for debugging. |
void |
step(Debugger.StepType type)
Steps the execution of the currently loaded document. |
boolean |
toggleBreakpoint(OpenDefinitionsDocument doc,
int offset,
int lineNum,
boolean isEnabled)
Toggles whether a breakpoint is set at the given line in the given document. |
Method Detail |
---|
void addListener(DebugListener listener)
listener
- a listener that reacts on events generated by the Debuggervoid removeListener(DebugListener listener)
listener
- listener to removeboolean isAvailable()
DebugModelCallback callback()
void startUp() throws DebugException
DebugException
void shutdown()
boolean isReady()
void setCurrentThread(DebugThreadData d) throws DebugException
DebugException
void resume() throws DebugException
DebugException
void resume(DebugThreadData data) throws DebugException
data
- the DebugThreadData representing the thread to resume
DebugException
void step(Debugger.StepType type) throws DebugException
DebugException
void addWatch(String field) throws DebugException
field
- the name of the field we will watch
DebugException
void removeWatch(String field) throws DebugException
field
- the name of the field we will watch
DebugException
void removeWatch(int index) throws DebugException
index
- Index of the watch to remove
DebugException
void removeAllWatches() throws DebugException
DebugException
boolean toggleBreakpoint(OpenDefinitionsDocument doc, int offset, int lineNum, boolean isEnabled) throws DebugException
doc
- Document in which to set or remove the breakpointoffset
- Start offset on the line to set the breakpointlineNum
- Line on which to set or remove the breakpoint, >=1isEnabled
- true
if this breakpoint should be enabled
DebugException
void setBreakpoint(Breakpoint breakpoint) throws DebugException
breakpoint
- The new breakpoint to set
DebugException
void removeBreakpoint(Breakpoint breakpoint) throws DebugException
breakpoint
- The breakpoint to remove.
DebugException
ArrayList<DebugWatchData> getWatches() throws DebugException
DebugException
ArrayList<DebugThreadData> getCurrentThreadData() throws DebugException
DebugException
ArrayList<DebugStackData> getCurrentStackFrameData() throws DebugException
DebugException
boolean hasSuspendedThreads() throws DebugException
DebugException
boolean hasRunningThread() throws DebugException
DebugException
boolean isCurrentThreadSuspended() throws DebugException
DebugException
void scrollToSource(DebugStackData data) throws DebugException
data
- the DebugStackData representing the source location
DebugException
void scrollToSource(Breakpoint bp)
bp
- the Breakpoint representing the source locationBreakpoint getBreakpoint(int line, String className) throws DebugException
DebugException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |