Show / Hide Table of Contents

Interface IDebugger

Interface for debuggers to implement, in order to provide debugging facilities to Scripts.

Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public interface IDebugger

Methods

GetAction(Int32, SourceRef)

Called by the script engine to get what action to do next.

Declaration
DebuggerAction GetAction(int ip, SourceRef sourceref)
Parameters
System.Int32 ip

The instruction pointer in bytecode.

SourceRef sourceref

The source reference.

Returns
DebuggerAction

T

GetDebuggerCaps()

Gets the debugger caps.

Declaration
DebuggerCaps GetDebuggerCaps()
Returns
DebuggerCaps

GetWatchItems()

Called by the script engine to get which expressions are active watches in the debugger.

Declaration
List<DynamicExpression> GetWatchItems()
Returns
List<DynamicExpression>

A list of watches

IsPauseRequested()

Called by the script engine at execution time to check if a break has been requested. Should return pretty fast as it's called A LOT.

Declaration
bool IsPauseRequested()
Returns
System.Boolean

RefreshBreakpoints(IEnumerable<SourceRef>)

Called by the script engine to refresh the breakpoint list.

Declaration
void RefreshBreakpoints(IEnumerable<SourceRef> refs)
Parameters
IEnumerable<SourceRef> refs

SetByteCode(String[])

Called by the script engine when the bytecode changes.

Declaration
void SetByteCode(string[] byteCode)
Parameters
System.String[] byteCode

The bytecode source

SetDebugService(DebugService)

Sets the debug service for this debugger

Declaration
void SetDebugService(DebugService debugService)
Parameters
DebugService debugService

The debug service.

SetSourceCode(SourceCode)

Called by the script engine when a source code is added or changed.

Declaration
void SetSourceCode(SourceCode sourceCode)
Parameters
SourceCode sourceCode

The source code object.

SignalExecutionEnded()

Called by the script engine when the execution ends.

Declaration
void SignalExecutionEnded()

SignalRuntimeException(ScriptRuntimeException)

Called by the script engine when a runtime error occurs. The debugger can return true to signal the engine that it wants to break into the source of the error. If it does so, it should also return true to subsequent calls to IsPauseRequested().

Declaration
bool SignalRuntimeException(ScriptRuntimeException ex)
Parameters
ScriptRuntimeException ex

The runtime exception.

Returns
System.Boolean

True if this error should break execution.

Update(WatchType, IEnumerable<WatchItem>)

Called by the script engine to update watches of a given type. Note that this method is not called only for watches in the strictest term, but also for the stack, etc.

Declaration
void Update(WatchType watchType, IEnumerable<WatchItem> items)
Parameters
WatchType watchType

Type of the watch.

IEnumerable<WatchItem> items

The items.

Back to top Built by Itinero, MIT licensed.