Table of Contents

Class ScriptDebugger

Namespace
Alternet.Scripter.Debugger.TypeScript
Assembly
Alternet.Scripter.TypeScript.Debugger.v9.dll

Enables communication with a debugger.

public class ScriptDebugger : IScriptDebugger, IScriptDebuggerBase
Inheritance
ScriptDebugger
Implements

Constructors

ScriptDebugger()

Initializes a new instance of the ScriptDebugger class with default settings.

Properties

Breakpoints

Returns collection of debugger breakpoints.

Capabilities

Gets debugger capabilities.

EventsSyncAction

Gets or sets an action used to synchronize events raising. This is normally a function provided by the application to sync raised debugger events (for example, perform Control.Invoke)

ExpressionEvaluator

Gets IExpressionEvaluator object used to evaluate expressions.

IsStarted

Indicates whether debugging was started.

Options

Gets start debugging options.

ScopeResolutionService

Gets IExpressionEvaluator object used to evaluate expressions.

ScriptRun

Contains all information required to compile and run the script.

State

Gets current debugger state.

Methods

ActivateThread(int)

Switches debugging to the specified thread.

AddBreakpointAsync(Breakpoint)

Adds a Breakpoint to the list.

Break()

Causes the given process to pause its execution so that its current state can be analyzed.

ClearTemporaryGeneratedModules()

Clears temporary generated modules on disk.

Continue()

Continues given process to the next breakpoint or until process finishes.

EnableBreakpointAsync(Breakpoint, bool)

Enables or disables specified breakpoint.

EvaluateCurrentExceptionAsync(CancellationToken)

Evaluates an expression based on the current stack frame. If the expression can be parsed but not evaluated, an object is returned but will not contain a valid value.

EvaluateExpressionAsync(ExpressionEvaluationRequest, CancellationToken)

Evaluates an expression based on the current stack frame. If the expression can be parsed but not evaluated, an object is returned but will not contain a valid value.

EvaluateExpressionsAsync(IEnumerable<ExpressionEvaluationRequest>, CancellationToken)

Evaluates an expression based on the current stack frame. If the expression can be parsed but not evaluated, an object is returned but will not contain a valid value.

GetExecutionPositionAsync(CancellationToken)

Finds out current ExecutionPosition based on the current stack frame.

GetSessions(string)

Retrieves list of ChromeSessionInfo asynchronously by given URL.

GetStackFramesAsync(CancellationToken)

Gets list of method calls that are currently on a stack.

GetThreadsAsync(CancellationToken)

When implemented by a class, gets list of active threads.

GetVariablesInScopeAsync(CancellationToken)

Receives all local variables based on the current stack frame.

RaiseActiveThreadChanged(ActiveThreadChangedEventArgs)
RaiseBeforeContinue()
RaiseBeforeStep()
RaiseBeforeStop()
RaiseDebuggerErrorOccured(DebuggerErrorOccuredEventArgs)
RaiseDebuggingStarted(DebuggingStartedEventArgs)
RaiseDebuggingStopped(DebuggingStoppedEventArgs)
RaiseExecutionResumed(ExecutionResumedEventArgs)
RaiseExecutionStopped(ExecutionStoppedEventArgs)
RaiseLogMessageReceived(LogMessageReceivedEventArgs)
RaiseStackFrameSwitched(StackFrameSwitchedEventArgs)
RaiseStateChanged(DebuggerStateChangedEventArgs)
RemoveBreakpointAsync(Breakpoint)

Removes a Breakpoint from the list.

RunScript(string[])

Starts executing the script without debugging.

RunScriptAsync(string[])

Starts executing the script without debugging.

SetRunToPositionBreakpoint(RunToPositionBreakpoint)

Causes debugger to stop at the specified position.

StartDebugging()

Starts executing the program from the entry point with default settings.

StartDebugging(StartDebuggingOptions)

Starts executing the program from the entry point with specified settings.

StepInto()

Executes one statement of code; steps into the next function call, if possible.

StepOut()

Executes one statement of code; steps out of the function currently being executed.

StepOver()

Executes one statement of code; steps over the next function call.

StopDebuggingAsync(CancellationToken)

Stops executing the program.

SwitchToStackFrame(StackFrame)

Switches debugging to the given stack frame.

TrySetNextStatementAsync(int, CancellationToken)

Tries to set the execution point to the specified line of code.

Events

ActiveThreadChanged

Occurs when thread to be debugged changes.

BeforeContinue

Occurs before debugger continues to program execution.

BeforeStep

Occurs before debugger performs a step.

BeforeStop

Occurs before debugger stop debugging.

DebuggerErrorOccured

Occurs when encounters error during debugging session.

DebuggingStarted

Occurs when debugging session is started.

DebuggingStopped

Occurs when debugging session is stopped.

ExecutionResumed

Occurs when debugging is resumed after being paused.

ExecutionStopped

Occurs when debugging is paused.

LogMessageReceived

Occurs when debug message is received.

SourceFileLocationResolve

Occurs when source file location resolution is requested.

StackFrameSwitched

Occurs debugger switches to the stack frame.

StateChanged

Occurs when debugger state is changed.