Class PythonDebugger

java.lang.Object
org.eclipse.ease.debugging.AbstractEaseDebugger
org.eclipse.ease.lang.python.debugger.PythonDebugger
All Implemented Interfaces:
IEventProcessor, IExecutionListener
Direct Known Subclasses:
Py4jDebugger

public class PythonDebugger extends AbstractEaseDebugger implements IEventProcessor, IExecutionListener
Debugger class handling communication between Python and Eclipse.
  • Field Details

    • PYTHON_DEBUGGER_VARIABLE

      public static final String PYTHON_DEBUGGER_VARIABLE
      Variable name for PythonDebugger in Python engine. During setup phase set this variable BEFORE calling edb.py.
      See Also:
  • Constructor Details

  • Method Details

    • setCodeTracer

      public void setCodeTracer(ICodeTracer tracer)
      Sets the ICodeTracer from the Python implementation.

      This method will be called by edb.py on "_pyease_debugger".

      Parameters:
      tracer - ICodeTracer for the connection between Eclipse and Python.
    • traceDispatch

      public void traceDispatch(IPyFrame frame, String type)
      Function called from ICodeTracer whenever a new frame in Python is hit. Effectively checks if debugger should suspend or continue.
      Parameters:
      frame - IPyFrame for current execution point.
      type - Type of trace step that occurred (ignored).
    • execute

      public Object execute(Script script)
      Runs the given Script using the ICodeTracer.

      Return values are ignored in debug mode.

      Parameters:
      script - Script to be executed.
      Returns:
      Always null
    • getScriptRegistry

      public IPythonScriptRegistry getScriptRegistry()
      Returns the IPythonScriptRegistry used by the debugger. If debugger has been set up incorrectly (e.g. script registry not tailored for python) this will return null.
      Returns:
      IPythonScriptRegistry or null.