Debugger Debugger Debugger Class

Definition

Base class for all PowerShell debuggers.

public abstract class Debugger
type Debugger = class
Public MustInherit Class Debugger
Inheritance
DebuggerDebuggerDebugger

Constructors

Debugger() Debugger() Debugger()

Properties

DebuggerStopped DebuggerStopped DebuggerStopped

True when the debugger is stopped.

DebugMode DebugMode DebugMode

DebuggerMode

InBreakpoint InBreakpoint InBreakpoint

True when debugger is stopped at a breakpoint.

InstanceId InstanceId InstanceId

InstanceId

IsActive IsActive IsActive

Returns true if debugger has breakpoints set and is currently active.

Methods

CancelDebuggerProcessing() CancelDebuggerProcessing() CancelDebuggerProcessing()

Causes the CancelRunspaceDebugProcessing event to be raised which notifies subscribers that current debugging sessions should be cancelled.

GetCallStack() GetCallStack() GetCallStack()

Returns IEnumerable of CallStackFrame objects.

GetDebuggerStopArgs() GetDebuggerStopArgs() GetDebuggerStopArgs()

Returns current debugger stop event arguments if debugger is in debug stop state. Otherwise returns null.

IsDebuggerBreakpointUpdatedEventSubscribed() IsDebuggerBreakpointUpdatedEventSubscribed() IsDebuggerBreakpointUpdatedEventSubscribed()

IsDebuggerBreakpointUpdatedEventSubscribed

IsDebuggerStopEventSubscribed() IsDebuggerStopEventSubscribed() IsDebuggerStopEventSubscribed()

IsDebuggerStopEventSubscribed

IsStartRunspaceDebugProcessingEventSubscribed() IsStartRunspaceDebugProcessingEventSubscribed() IsStartRunspaceDebugProcessingEventSubscribed()
ProcessCommand(PSCommand, PSDataCollection<PSObject>) ProcessCommand(PSCommand, PSDataCollection<PSObject>) ProcessCommand(PSCommand, PSDataCollection<PSObject>)

Evaluates provided command either as a debugger specific command or a PowerShell command.

RaiseBreakpointUpdatedEvent(BreakpointUpdatedEventArgs) RaiseBreakpointUpdatedEvent(BreakpointUpdatedEventArgs) RaiseBreakpointUpdatedEvent(BreakpointUpdatedEventArgs)

RaiseBreakpointUpdatedEvent

RaiseCancelRunspaceDebugProcessingEvent() RaiseCancelRunspaceDebugProcessingEvent() RaiseCancelRunspaceDebugProcessingEvent()
RaiseDebuggerStopEvent(DebuggerStopEventArgs) RaiseDebuggerStopEvent(DebuggerStopEventArgs) RaiseDebuggerStopEvent(DebuggerStopEventArgs)

RaiseDebuggerStopEvent

RaiseRunspaceProcessingCompletedEvent(ProcessRunspaceDebugEndEventArgs) RaiseRunspaceProcessingCompletedEvent(ProcessRunspaceDebugEndEventArgs) RaiseRunspaceProcessingCompletedEvent(ProcessRunspaceDebugEndEventArgs)
RaiseStartRunspaceDebugProcessingEvent(StartRunspaceDebugProcessingEventArgs) RaiseStartRunspaceDebugProcessingEvent(StartRunspaceDebugProcessingEventArgs) RaiseStartRunspaceDebugProcessingEvent(StartRunspaceDebugProcessingEventArgs)
ResetCommandProcessorSource() ResetCommandProcessorSource() ResetCommandProcessorSource()

Resets the command processor source information so that it is updated with latest information on the next debug stop.

SetBreakpoints(IEnumerable<Breakpoint>) SetBreakpoints(IEnumerable<Breakpoint>) SetBreakpoints(IEnumerable<Breakpoint>)

Adds the provided set of breakpoints to the debugger.

SetDebuggerAction(DebuggerResumeAction) SetDebuggerAction(DebuggerResumeAction) SetDebuggerAction(DebuggerResumeAction)

Sets the debugger resume action.

SetDebuggerStepMode(Boolean) SetDebuggerStepMode(Boolean) SetDebuggerStepMode(Boolean)

Sets debugger stepping mode.

SetDebugMode(DebugModes) SetDebugMode(DebugModes) SetDebugMode(DebugModes)

Sets the debugger mode.

SetParent(Debugger, IEnumerable<Breakpoint>, Nullable<DebuggerResumeAction>, PSHost, PathInfo) SetParent(Debugger, IEnumerable<Breakpoint>, Nullable<DebuggerResumeAction>, PSHost, PathInfo) SetParent(Debugger, IEnumerable<Breakpoint>, Nullable<DebuggerResumeAction>, PSHost, PathInfo)

Sets the parent debugger and breakpoints.

SetParent(Debugger, IEnumerable<Breakpoint>, Nullable<DebuggerResumeAction>, PSHost, PathInfo, Dictionary<String,DebugSource>) SetParent(Debugger, IEnumerable<Breakpoint>, Nullable<DebuggerResumeAction>, PSHost, PathInfo, Dictionary<String,DebugSource>) SetParent(Debugger, IEnumerable<Breakpoint>, Nullable<DebuggerResumeAction>, PSHost, PathInfo, Dictionary<String,DebugSource>)

Sets the parent debugger, breakpoints, function source and other debugging context information.

StopProcessCommand() StopProcessCommand() StopProcessCommand()

Stops a running command.

Events

BreakpointUpdated BreakpointUpdated BreakpointUpdated

Event raised when a breakpoint is updated

CancelRunspaceDebugProcessing CancelRunspaceDebugProcessing CancelRunspaceDebugProcessing

Event raised to indicate that the debugging session is over and runspace debuggers queued for processing should be released.

DebuggerStop DebuggerStop DebuggerStop

Event raised when the debugger hits a breakpoint or a step

RunspaceDebugProcessingCompleted RunspaceDebugProcessingCompleted RunspaceDebugProcessingCompleted

Event raised when a runspace debugger is finished being processed.

StartRunspaceDebugProcessing StartRunspaceDebugProcessing StartRunspaceDebugProcessing

Event raised when a runspace debugger needs breakpoint processing.

Applies to