CmdID / PowerShell / Cmdlets / Get
Get-PSBreakpoint
Gets the breakpoints that are set in the current session. PowerShell reference
From the PowerShell reference
5 parameters
Alias gbp
What it does
Gets the breakpoints that are set in the current session. The Get-PSBreakpoint cmdlet gets the breakpoints that are set in the current session. You can use the cmdlet parameters to get particular breakpoints. A breakpoint is a point in a command or script where execution stops temporarily so that you can examine the instructions. Get-PSBreakpoint is one of several cmdlets designed for debugging PowerShell scripts and commands. For more information about the PowerShell debugger, see about_Debuggers.
Get-PSBreakpoint [-Script <String[]>] [<CommonParameters>]Get-PSBreakpoint [-Script <String[]>] -Variable <String[]> [<CommonParameters>]Get-PSBreakpoint [-Script <String[]>] -Command <String[]> [<CommonParameters>]Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParameters>]Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>]
Get all breakpoints for all scripts and functions
Get-PSBreakpointIdentifyGet breakpoints by ID
Get-PSBreakpoint -Id 2IdentifyPipe an ID to Get-PSBreakpoint
$B = Set-PSBreakpoint -Script "sample.ps1" -Command "Increment"
$B.Id | Get-PSBreakpointIdentifyGet breakpoints in specified script files
Get-PSBreakpoint -Script "Sample.ps1, SupportScript.ps1"IdentifyGet breakpoints in specified cmdlets
Get-PSBreakpoint -Command "Read-Host, Write-Host" -Script "Sample.ps1"IdentifyGet Command breakpoints in a specified file
Get-PSBreakpoint -Type Command -Script "Sample.ps1"IdentifyGet breakpoints by variable
Get-PSBreakpoint -Variable "Index, Swap"IdentifyGet all Line and Variable breakpoints in a file
Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1"IdentifyIts page in the reference: Get-PSBreakpoint.
Parameters
-CommandSpecifies an array of command breakpoints that are set on the specified command names. Enter the command names, such as the name of a cmdlet or function.-IdSpecifies the breakpoint IDs that this cmdlet gets. Enter the IDs in a comma-separated list. You can also pipe breakpoint IDs to Get-PSBreakpoint.-ScriptSpecifies an array of scripts that contain the breakpoints. Enter the path (optional) and names of one or more script files. If you omit the path, the default location is the current directory.-TypeSpecifies an array of breakpoint types that this cmdlet gets. Enter one or more types. The acceptable values for this parameter are:
- Line
- Command
- Variable
You can also pipe breakpoint types to Get-PSBreakpoint.-VariableSpecifies an array of variable breakpoints that are set on the specified variable names. Enter the variable names without dollar signs.