Compartilhar via


Debugger Class

Definition

Base class for all PowerShell debuggers.

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

Constructors

Debugger()

Properties

DebuggerStopped

True when the debugger is stopped.

DebugMode

DebuggerMode.

InBreakpoint

True when debugger is stopped at a breakpoint.

InstanceId

InstanceId.

IsActive

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

Methods

CancelDebuggerProcessing()

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

DisableBreakpoint(Breakpoint, Nullable<Int32>)

Disables a breakpoint in the debugger.

DisableBreakpoint(Breakpoint)

Disables a breakpoint in the debugger in the current runspace.

EnableBreakpoint(Breakpoint, Nullable<Int32>)

Enables a breakpoint in the debugger.

EnableBreakpoint(Breakpoint)

Enables a breakpoint in the debugger in the current runspace.

GetBreakpoint(Int32, Nullable<Int32>)

Get a breakpoint by id, primarily for Enable/Disable/Remove-PSBreakpoint cmdlets.

GetBreakpoint(Int32)

Get a breakpoint by id in the current runspace, primarily for Enable/Disable/Remove-PSBreakpoint cmdlets.

GetBreakpoints()

Returns breakpoints in the current runspace, primarily for the Get-PSBreakpoint cmdlet.

GetBreakpoints(Nullable<Int32>)

Returns breakpoints primarily for the Get-PSBreakpoint cmdlet.

GetCallStack()

Returns IEnumerable of CallStackFrame objects.

GetDebuggerStopArgs()

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

IsDebuggerBreakpointUpdatedEventSubscribed()

IsDebuggerBreakpointUpdatedEventSubscribed.

IsDebuggerStopEventSubscribed()

IsDebuggerStopEventSubscribed.

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

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

RaiseBreakpointUpdatedEvent(BreakpointUpdatedEventArgs)

RaiseBreakpointUpdatedEvent.

RaiseCancelRunspaceDebugProcessingEvent()
RaiseDebuggerStopEvent(DebuggerStopEventArgs)

RaiseDebuggerStopEvent.

RaiseRunspaceProcessingCompletedEvent(ProcessRunspaceDebugEndEventArgs)
RaiseStartRunspaceDebugProcessingEvent(StartRunspaceDebugProcessingEventArgs)
RemoveBreakpoint(Breakpoint, Nullable<Int32>)

Removes a breakpoint from the debugger.

RemoveBreakpoint(Breakpoint)

Removes a breakpoint from the debugger in the current runspace.

ResetCommandProcessorSource()

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

SetBreakpoints(IEnumerable<Breakpoint>, Nullable<Int32>)

Adds the provided set of breakpoints to the debugger.

SetBreakpoints(IEnumerable<Breakpoint>)

Adds the provided set of breakpoints to the debugger, in the current runspace.

SetCommandBreakpoint(String, ScriptBlock, String, Nullable<Int32>)

Sets a command breakpoint in the debugger.

SetCommandBreakpoint(String, ScriptBlock, String)

Sets a command breakpoint in the current runspace in the debugger.

SetDebuggerAction(DebuggerResumeAction)

Sets the debugger resume action.

SetDebuggerStepMode(Boolean)

Sets debugger stepping mode.

SetDebugMode(DebugModes)

Sets the debugger mode.

SetLineBreakpoint(String, Int32, Int32, ScriptBlock, Nullable<Int32>)

Sets a line breakpoint in the debugger.

SetLineBreakpoint(String, Int32, Int32, ScriptBlock)

Sets a line breakpoint in the current runspace in the debugger.

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

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

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

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

SetVariableBreakpoint(String, VariableAccessMode, ScriptBlock, String, Nullable<Int32>)

Sets a variable breakpoint in the debugger.

SetVariableBreakpoint(String, VariableAccessMode, ScriptBlock, String)

Sets a variable breakpoint in the current runspace in the debugger.

StopProcessCommand()

Stops a running command.

Events

BreakpointUpdated

Event raised when a breakpoint is updated.

CancelRunspaceDebugProcessing

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

DebuggerStop

Event raised when the debugger hits a breakpoint or a step.

RunspaceDebugProcessingCompleted

Event raised when a runspace debugger is finished being processed.

StartRunspaceDebugProcessing

Event raised when a runspace debugger needs breakpoint processing.

Applies to