org.mozilla.javascript.debug
Interface DebuggableEngine

All Known Implementing Classes:
DebuggableEngineImpl

public interface DebuggableEngine


Method Summary
 boolean getBreakNextLine()
          Return the value of the breakNextLine flag.
 Debugger getDebugger()
          Return the current debugger.
 DebugFrame getFrame(int frameNumber)
          Return a frame from the current execution.
 int getFrameCount()
          Return the number of frames in current execution.
 void setBreakNextLine(boolean isLineStep)
          Set whether the engine should break when it encounters the next line.
 void setDebugger(Debugger debugger)
          Set the associated debugger.
 

Method Detail

setBreakNextLine

public void setBreakNextLine(boolean isLineStep)
Set whether the engine should break when it encounters the next line.

The engine will call the attached debugger's handleBreakpointHit method on the next line it executes if isLineStep is true. May be used from another thread to interrupt execution.

Parameters:
isLineStep - if true, break next line

getBreakNextLine

public boolean getBreakNextLine()
Return the value of the breakNextLine flag.
Returns:
true if the engine will break on execution of the next line.

setDebugger

public void setDebugger(Debugger debugger)
Set the associated debugger.
Parameters:
debugger - the debugger to be used on callbacks from the engine.

getDebugger

public Debugger getDebugger()
Return the current debugger.
Returns:
the debugger, or null if none is attached.

getFrameCount

public int getFrameCount()
Return the number of frames in current execution.
Returns:
the count of current frames

getFrame

public DebugFrame getFrame(int frameNumber)
Return a frame from the current execution. Frames are numbered starting from 0 for the innermost frame.
Parameters:
frameNumber - the number of the frame in the range [0,frameCount-1]
Returns:
the relevant Frame, or null if frameNumber is out of range or the engine isn't currently saving frames