Delete breakpoints from the current console.
Syntax Remove-PSBreakpoint [-Id] Int32[] [-Confirm] [-WhatIf] [CommonParameters] Remove-PSBreakpoint [-Breakpoint] Breakpoint[] [-Confirm] [-WhatIf] [CommonParameters] Key -Breakpoint Breakpoint[] The breakpoints to delete. Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command. (May be piped)
-Id Int32[] Delete breakpoints with the specified breakpoint IDs. -Confirm Prompt for confirmation before executing the command. -WhatIf Describes what would happen if you executed the command without actually executing the command. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer -OutVariable.
Standard Aliases for Remove-PSBreakpoint: rbp
A breakpoint is a point in a command or script where execution stops temporarily so that you can examine the instructions.
Examples
Delete all of the breakpoints in the current console:
PS C:> Get-PSBreakpoint | Remove-PSBreakpoint
Use the Set-PSBreakpoint cmdlet to create a breakpoint on the SS64 variable in the demo.ps1 script. Then, save the breakpoint object in the $brk variable and use this to delete the new breakpoint:
PS C:> $brk = Set-PSBreakpoint -script demo.ps1 -variable SS64
PS C:> $brk | remove-psbreakpoint
Get a breakpoint on the ss64 function in demo.ps1 by piping a breakpoint ID:
PS C:> $brk = Set-PSBreakpoint -script demo.ps1 -function ss64
PS C:> $brk.Id | get-PSBreakpoint
Delete the breakpoint with breakpoint ID 5:
PS C:> Remove-PSBreakpoint -id 5
A function to delete all of the breakpoints in the current console. To save the function permanently, add it to your PowerShell profile:
PS C:> function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
“Better bend than break” ~ Scottish Proverb
Related PowerShell Cmdlets:
Enable-PSBreakpoint - Enable breakpoints in the current console