Debugger Class
Represents a Grammar debugger that can control parser execution and obtain detailed information about parser state.
public class Debugger : IDebugger
- Inheritance:
- object object
- Implements:
- IDebugger
Constructors
Debugger()
Initializes an instance of the class.
public Debugger()
Properties
IsAttached
Gets whether the debugger is currently attached to an ICodeDocument.
public 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.
public 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.
public 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.
public 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.
public void Detach()
OnModeChanged(EventArgs)
Raises the ModeChanged
event.
protected virtual void OnModeChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
Pause()
Requests that the debugger pause execution if the it is currently running.
public void Pause()
Start()
Starts debugging on the attached document.
StepInto()
Steps into the next debuggable location.
public void StepInto()
StepOut()
Steps out of the current debuggable location.
public void StepOut()
StepOver()
Steps over the current debuggable location.
public void StepOver()
Stop()
Stops debugging on the attached document.
public void Stop()
Events
ModeChanged
Occurs when the Mode property changes.