In This Article

IDebugger Interface

Provides the base requirements for a Grammar debugger that can control parser execution and obtain detailed information about parser state.

public interface IDebugger

Properties

IsAttached

Gets whether the debugger is currently attached to an ICodeDocument.

bool IsAttached { get; }

Property Value

bool:

true if the debugger is currently attached to an ICodeDocument; otherwise, false.

Mode

Gets the current DebuggerMode of the debugger.

DebuggerMode Mode { get; }

Property Value

DebuggerMode:

The current DebuggerMode of the debugger.

State

Gets the IDebuggerState that contains information about the current state of the debugger.

IDebuggerState State { get; }

Property Value

IDebuggerState:

The IDebuggerState that contains information about the current state of the debugger.

Methods

Attach(ICodeDocument)

Attempts to attach the debugger to the specified ICodeDocument using the IParser indicated by its ISyntaxLanguage.

bool Attach(ICodeDocument document)
Parameter Type Description
document ICodeDocument

The ICodeDocument to debug.

Returns

bool:

true if the debugger was attached; otherwise, false.

Remarks

This method will return false if the debugger is already attached to a document, if the document doesn't have an ISyntaxLanguage, or if the syntax language's IParser isn't an ILLParser.

Detach()

Detaches from the currently-attached document, if any.

void Detach()

NotifyBreak()

Called by the parser to notify the debugger it has paused execution.

void NotifyBreak()

Pause()

Requests that the debugger pause execution if the it is currently running.

void Pause()

Start()

Starts debugging on the attached document.

bool Start()

Returns

bool:

true if debugging started; otherwise, false.

StepInto()

Steps into the next debuggable location.

void StepInto()

StepOut()

Steps out of the current debuggable location.

void StepOut()

StepOver()

Steps over the current debuggable location.

void StepOver()

Stop()

Stops debugging on the attached document.

void Stop()

Events

ModeChanged

Occurs when the Mode property changes.

event EventHandler ModeChanged

Event Type

EventHandler