Dela via


Debugger.SetVariableBreakpoint Method

Definition

Overloads

SetVariableBreakpoint(String, VariableAccessMode, ScriptBlock, String)

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

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.

public System.Management.Automation.VariableBreakpoint SetVariableBreakpoint (string variableName, System.Management.Automation.VariableAccessMode accessMode, System.Management.Automation.ScriptBlock action, string path);
member this.SetVariableBreakpoint : string * System.Management.Automation.VariableAccessMode * System.Management.Automation.ScriptBlock * string -> System.Management.Automation.VariableBreakpoint
Public Function SetVariableBreakpoint (variableName As String, accessMode As VariableAccessMode, action As ScriptBlock, path As String) As VariableBreakpoint

Parameters

variableName
String

The name of the variable that will trigger the breakpoint. This value may not be null.

accessMode
VariableAccessMode

The variable access mode that will trigger the breakpoint.

action
ScriptBlock

The action to take when the breakpoint is hit. If null, PowerShell will break into the debugger when the breakpoint is hit.

path
String

The path to the script file where the breakpoint may be hit. If null, the breakpoint may be hit anywhere the variable is accessed using the specified access mode.

Returns

The variable breakpoint that was set.

Applies to

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

Sets a variable breakpoint in the debugger.

public virtual System.Management.Automation.VariableBreakpoint SetVariableBreakpoint (string variableName, System.Management.Automation.VariableAccessMode accessMode, System.Management.Automation.ScriptBlock action, string path, int? runspaceId);
abstract member SetVariableBreakpoint : string * System.Management.Automation.VariableAccessMode * System.Management.Automation.ScriptBlock * string * Nullable<int> -> System.Management.Automation.VariableBreakpoint
override this.SetVariableBreakpoint : string * System.Management.Automation.VariableAccessMode * System.Management.Automation.ScriptBlock * string * Nullable<int> -> System.Management.Automation.VariableBreakpoint
Public Overridable Function SetVariableBreakpoint (variableName As String, accessMode As VariableAccessMode, action As ScriptBlock, path As String, runspaceId As Nullable(Of Integer)) As VariableBreakpoint

Parameters

variableName
String

The name of the variable that will trigger the breakpoint. This value may not be null.

accessMode
VariableAccessMode

The variable access mode that will trigger the breakpoint.

action
ScriptBlock

The action to take when the breakpoint is hit. If null, PowerShell will break into the debugger when the breakpoint is hit.

path
String

The path to the script file where the breakpoint may be hit. If null, the breakpoint may be hit anywhere the variable is accessed using the specified access mode.

runspaceId
Nullable<Int32>

The runspace id of the runspace you want to interact with. A null value will use the current runspace.

Returns

The variable breakpoint that was set.

Applies to