Interface DebugFrame

All Known Implementing Classes:
Dim.StackFrame

public interface DebugFrame
Interface to implement if the application is interested in receiving debug information during execution of a particular script or function.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called when the function or script executes a 'debugger' statement.
    default void
    onEnter(Context cx, VarScope activation, Object thisObj, Object[] args)
    Called when execution is ready to start bytecode interpretation for entered a particular function or script.
    default void
    Called when thrown exception is handled by the function or script.
    default void
    onExit(Context cx, boolean byThrow, Object resultOrException)
    Called when the function or script for this frame is about to return.
    default void
    onLineChange(Context cx, int lineNumber)
    Called when executed code reaches new line in the source.
  • Method Details

    • onEnter

      default void onEnter(Context cx, VarScope activation, Object thisObj, Object[] args)
      Called when execution is ready to start bytecode interpretation for entered a particular function or script.
      Parameters:
      cx - current Context for this thread
      activation - the activation scope for the function or script.
      thisObj - value of the JavaScript this object
      args - the array of arguments
    • onLineChange

      default void onLineChange(Context cx, int lineNumber)
      Called when executed code reaches new line in the source.
      Parameters:
      cx - current Context for this thread
      lineNumber - current line number in the script source
    • onExceptionThrown

      default void onExceptionThrown(Context cx, Throwable ex)
      Called when thrown exception is handled by the function or script.
      Parameters:
      cx - current Context for this thread
      ex - exception object
    • onExit

      default void onExit(Context cx, boolean byThrow, Object resultOrException)
      Called when the function or script for this frame is about to return.
      Parameters:
      cx - current Context for this thread
      byThrow - if true function will leave by throwing exception, otherwise it will execute normal return
      resultOrException - function result in case of normal return or exception object if about to throw exception
    • onDebuggerStatement

      default void onDebuggerStatement(Context cx)
      Called when the function or script executes a 'debugger' statement.
      Parameters:
      cx - current Context for this thread