org.mozilla.javascript.debug
Interface DebuggableScript

All Known Implementing Classes:
InterpretedScript

public interface DebuggableScript

This interface exposes debugging information from executable code (either functions or top-level scripts).


Method Summary
 int[] getLineNumbers()
          Get array containing the line numbers that can have breakpoints placed on them.
 Scriptable getScriptable()
          Get the Scriptable object (Function or Script) that is described by this DebuggableScript object.
 java.lang.String getSourceName()
          Get the name of the source (usually filename or URL) of the script.
 boolean isFunction()
          Returns true if this is a function, false if it is a script.
 boolean placeBreakpoint(int line)
          Place a breakpoint at the given line.
 boolean removeBreakpoint(int line)
          Remove a breakpoint from the given line.
 

Method Detail

isFunction

public boolean isFunction()
Returns true if this is a function, false if it is a script.

getScriptable

public Scriptable getScriptable()
Get the Scriptable object (Function or Script) that is described by this DebuggableScript object.

getSourceName

public java.lang.String getSourceName()
Get the name of the source (usually filename or URL) of the script.

getLineNumbers

public int[] getLineNumbers()
Get array containing the line numbers that can have breakpoints placed on them.

placeBreakpoint

public boolean placeBreakpoint(int line)
Place a breakpoint at the given line.
Returns:
true if the breakpoint was successfully set.

removeBreakpoint

public boolean removeBreakpoint(int line)
Remove a breakpoint from the given line.
Returns:
true if there was a breakpoint at the given line.