Disable a breakpoint (or several breakpoints) in the current console, for debugging a .ps1 script.

      Disable-PSBreakpoint [-Id] Int32[]
        [-PassThru] [-Confirm] [-WhatIf] [CommonParameters]
      Disable-PSBreakpoint [-Breakpoint] Breakpoint[]
        [-PassThru] [-Confirm] [-WhatIf]  [CommonParameters]

   -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.

       Return an object representing the enabled breakpoints.
       By default, this cmdlet does not generate any output.

       Prompt for confirmation before executing the command.

       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

Related PowerShell Cmdlets

EnablePSBreakpoint - Enable breakpoints in the current console.
Get-PSBreakpoint - Get the currently set breakpoints.

Copyright © 1999-2024 SS64.com
Some rights reserved