Class Py4jDebuggerEngine
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
org.eclipse.ease.AbstractScriptEngine
org.eclipse.ease.AbstractReplScriptEngine
org.eclipse.ease.lang.python.py4j.internal.Py4jScriptEngine
org.eclipse.ease.lang.python.py4j.internal.Py4jDebuggerEngine
- All Implemented Interfaces:
Comparable
,org.eclipse.core.runtime.IAdaptable
,IDebugEngine
,IReplEngine
,IScriptEngine
,IPythonDebugEngine
public class Py4jDebuggerEngine extends Py4jScriptEngine implements IPythonDebugEngine
A script engine to debug Python code on a PY4J engine.
Uses most of
Py4jDebuggerEngine
's functionality and only extends it when file is to be debugged.-
Field Summary
Fields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
Fields inherited from interface org.eclipse.ease.IScriptEngine
TRACE_SCRIPT_ENGINE
-
Constructor Summary
Constructors Constructor Description Py4jDebuggerEngine()
-
Method Summary
Modifier and Type Method Description ScriptStackTrace
getExceptionStackTrace()
Get the stack trace of the last thrown exception of the current thread.ScriptStackTrace
getExceptionStackTrace(Object thread)
Get the stack trace of the last thrown exception of the given thread.Collection<EaseDebugVariable>
getVariables(Object scope)
Get variables within a specific scope or child elements for a given object.Object
removeVariable(String name)
Remove a variable from the scope.void
setDebugger(PythonDebugger debugger)
Sets the PythonDebugger for the debug engine.void
setupDebugger(org.eclipse.debug.core.ILaunch launch, boolean suspendOnStartup, boolean suspendOnScriptLoad, boolean showDynamicCode)
Methods inherited from class org.eclipse.ease.lang.python.py4j.internal.Py4jScriptEngine
getAdapter, pythonStartupComplete, registerJar, terminateCurrent, toString
Methods inherited from class org.eclipse.ease.AbstractReplScriptEngine
getDefinedVariables, getLastExecutionResult, getTerminateOnIdle, getType, setTerminateOnIdle, terminate
Methods inherited from class org.eclipse.ease.AbstractScriptEngine
addExecutionListener, addSecurityCheck, execute, getCurrentScriptEngine, getDescription, getErrorStream, getExecutedFile, getInputStream, getLaunch, getMonitor, getOutputStream, getStackTrace, getVariable, getVariables, hasVariable, inject, isFinished, joinEngine, joinEngine, removeExecutionListener, setCloseStreamsOnTerminate, setEngineDescription, setErrorStream, setExecutionRootFile, setInputStream, setLaunch, setOutputStream, setVariable
Methods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, belongsTo, cancel, create, create, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareTo
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.ease.IDebugEngine
getStackTrace
Methods inherited from interface org.eclipse.ease.IScriptEngine
addExecutionListener, addSecurityCheck, execute, getDescription, getErrorStream, getExecutedFile, getInputStream, getLaunch, getMonitor, getName, getOutputStream, getVariable, getVariables, hasVariable, inject, isFinished, joinEngine, joinEngine, registerJar, removeExecutionListener, schedule, setCloseStreamsOnTerminate, setErrorStream, setInputStream, setOutputStream, setVariable, terminate, terminateCurrent
-
Field Details
-
ENGINE_ID
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Py4jDebuggerEngine
public Py4jDebuggerEngine()
-
-
Method Details
-
setDebugger
Description copied from interface:IPythonDebugEngine
Sets the PythonDebugger for the debug engine.- Specified by:
setDebugger
in interfaceIPythonDebugEngine
- Parameters:
debugger
-PythonDebugger
to be used.
-
setupDebugger
public void setupDebugger(org.eclipse.debug.core.ILaunch launch, boolean suspendOnStartup, boolean suspendOnScriptLoad, boolean showDynamicCode)- Specified by:
setupDebugger
in interfaceIDebugEngine
-
getExceptionStackTrace
Description copied from interface:IDebugEngine
Get the stack trace of the last thrown exception of the current thread. Will be populated when an exception is thrown by the script engine. Can be evaluated in a try/catch statement within the script. Only available during script runtime.- Specified by:
getExceptionStackTrace
in interfaceIDebugEngine
- Returns:
- last exception stack trace or
null
-
getExceptionStackTrace
Description copied from interface:IDebugEngine
Get the stack trace of the last thrown exception of the given thread. Will be populated when an exception is thrown by the script engine. Can be evaluated in a try/catch statement within the script. Only available during script runtime.- Specified by:
getExceptionStackTrace
in interfaceIDebugEngine
- Parameters:
thread
- thread to get last exception stacktrace from- Returns:
- last exception stack trace or
null
-
removeVariable
Description copied from interface:IDebugEngine
Remove a variable from the scope.- Specified by:
removeVariable
in interfaceIDebugEngine
- Parameters:
name
- variable to be removed.- Returns:
- variable content
-
getVariables
Description copied from interface:IDebugEngine
Get variables within a specific scope or child elements for a given object.- Specified by:
getVariables
in interfaceIDebugEngine
- Parameters:
scope
- scope or parent object- Returns:
- variables assigned to scope
-