public final class Debugger extends Object
PolyglotEngine.
Access to the (singleton) instance in an engine, is available via:
To start new debugger session useDebugger.startSession(SuspendedCallback). Please see
DebuggerSession for a usage example.
The debugger supports diagnostic tracing that can be enabled using the
-Dtruffle.debug.trace=true Java property. The output of this tracing is not
guaranteed and will change without notice.
Debugger.startSession(SuspendedCallback),
DebuggerSession,
Breakpoint| Modifier and Type | Method and Description |
|---|---|
static Debugger |
find(PolyglotEngine engine)
Finds debugger associated with given engine.
|
static Debugger |
find(TruffleLanguage.Env env)
Finds the debugger associated with a given language environment.
|
List<Source> |
getLoadedSources()
Returns a list of all loaded sources.
|
DebuggerSession |
startSession(SuspendedCallback callback)
Starts a new
session provided with a callback that gets notified
whenever the execution is suspended. |
public DebuggerSession startSession(SuspendedCallback callback)
session provided with a callback that gets notified
whenever the execution is suspended.callback - the callback to notifyDebuggerSession,
SuspendedEventpublic List<Source> getLoadedSources()
public static Debugger find(PolyglotEngine engine)
PolyglotEngine.engine - the engine to find debugger fornullpublic static Debugger find(TruffleLanguage.Env env)
PolyglotEngine. Please note that a debugger instance
looked up with a language also has access to all other languages and sources that were loaded
by them.env - the language environment to find debugger fornull