Disable a breakpoint (or several breakpoints) in the current console, for debugging a .ps1 script.
Syntax
Disable-PSBreakpoint [-Id] Int32[]
[-PassThru] [-Confirm] [-WhatIf] [CommonParameters]
Disable-PSBreakpoint [-Breakpoint] Breakpoint[]
[-PassThru] [-Confirm] [-WhatIf] [CommonParameters]
Key
-Breakpoint Breakpoint[]
The breakpoints to disable. Enter a variable that contains breakpoint
objects or a command that gets breakpoint objects, (Get-PSBreakpoint).
You can also pipe breakpoint objects.
-Id Int32[]
Disable breakpoints with the specified breakpoint IDs.
Enter the IDs or a variable that contains the IDs.
You cannot pipe IDs to Disable-PSBreakpoint.
-PassThru
Return an object representing the enabled breakpoints.
By default, this cmdlet does not generate any output.
-confirm
Prompt for confirmation before executing the command.
-whatIf
Describe what would happen if you executed the command without actually
executing the command.
Standard Aliases for Disable-PSBreakpoint: dbp
Disable breakpoint ID 0:
PS C:> Disable-PSBreakpoint -id 0
Create a new, disabled breakpoint:
PS C:> Disable-PSBreakpoint -breakpoint ($brk = Set-PSBreakpoint -script c:\myscript.ps1 -line 25)
PS C:> $brk
Disable all breakpoints in the current console:
PS C:> Get-PSBreakpoint | disable-psbreakpoint
“The heart is the only broken instrument that works” ~ T. E. Kalem
EnablePSBreakpoint - Enable breakpoints in the current console.
Get-PSBreakpoint - Get the currently set breakpoints.