Share via


Debugger.SetLineBreakpoint Method

Definition

Overloads

SetLineBreakpoint(String, Int32, Int32, ScriptBlock)

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

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.

public System.Management.Automation.LineBreakpoint SetLineBreakpoint (string path, int line, int column, System.Management.Automation.ScriptBlock action);
member this.SetLineBreakpoint : string * int * int * System.Management.Automation.ScriptBlock -> System.Management.Automation.LineBreakpoint
Public Function SetLineBreakpoint (path As String, line As Integer, column As Integer, action As ScriptBlock) As LineBreakpoint

Parameters

path
String

The path to the script file where the breakpoint may be hit. This value may not be null.

line
Int32

The line in the script file where the breakpoint may be hit. This value must be greater than or equal to 1.

column
Int32

The column in the script file where the breakpoint may be hit. If 0, the breakpoint will trigger on any statement on the line.

action
ScriptBlock

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

Returns

The line breakpoint that was set.

Applies to

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

Sets a line breakpoint in the debugger.

public virtual System.Management.Automation.LineBreakpoint SetLineBreakpoint (string path, int line, int column, System.Management.Automation.ScriptBlock action, int? runspaceId);
abstract member SetLineBreakpoint : string * int * int * System.Management.Automation.ScriptBlock * Nullable<int> -> System.Management.Automation.LineBreakpoint
override this.SetLineBreakpoint : string * int * int * System.Management.Automation.ScriptBlock * Nullable<int> -> System.Management.Automation.LineBreakpoint
Public Overridable Function SetLineBreakpoint (path As String, line As Integer, column As Integer, action As ScriptBlock, runspaceId As Nullable(Of Integer)) As LineBreakpoint

Parameters

path
String

The path to the script file where the breakpoint may be hit. This value may not be null.

line
Int32

The line in the script file where the breakpoint may be hit. This value must be greater than or equal to 1.

column
Int32

The column in the script file where the breakpoint may be hit. If 0, the breakpoint will trigger on any statement on the line.

action
ScriptBlock

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

runspaceId
Nullable<Int32>

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

Returns

The line breakpoint that was set.

Applies to