PowerShell Logo Small

Remove-PSBreakpoint



This is the built-in help made by Microsoft for the command 'Remove-PSBreakpoint', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Deletes breakpoints from the current console.

SYNTAX


Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
[<System.String]>]] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-PSBreakpoint [-Id] <Int32[]> [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String]>]]
[-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-PSBreakpoint cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.


When you remove a breakpoint, the breakpoint object is no longer available or functional. If you have saved a breakpoint object in a variable, the reference still exists,
but the breakpoint does not function.


Remove-PSBreakpoint is one of several cmdlets designed for debugging Windows PowerShell scripts. For more information about the Windows PowerShell debugger, see
about_Debuggers.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=294004
Disable-PSBreakpoint
Enable-PSBreakpoint
Get-PSBreakpoint
Get-PSCallStack
Set-PSBreakpoint
about_Debuggers

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>get-breakpoint | remove-breakpoint



This command deletes all of the breakpoints in the current console.










-------------------------- EXAMPLE 2 --------------------------

PS C:\>$b = set-psbreakpoint -script sample.ps1 -variable Name
PS C:\>$b | remove-psbreakpoint



This command deletes a breakpoint.

The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script. Then, it saves the breakpoint object in the $b
variable.

The second command uses the Remove-PSBreakpoint cmdlet to delete the new breakpoint. It uses a pipeline operator (|) to send the breakpoint object in the $b variable to the
Remove-PSBreakpoint cmdlet.

As a result of this command, if you run the script, it runs to completion without stopping. Also, the Get-PSBreakpoint cmdlet does not return this breakpoint.










-------------------------- EXAMPLE 3 --------------------------

PS C:\>remove-psbreakpoint -id 2



This command deletes the breakpoint with breakpoint ID 2.










-------------------------- EXAMPLE 4 --------------------------

PS C:\>function del-psb { get-psbreakpoint | remove-psbreakpoint }



This simple function deletes all of the breakpoints in the current console. It uses the Get-PSBreakpoint cmdlet to get the breakpoints. Then, it uses a pipeline operator (|)
to send the breakpoints to the Remove-PSBreakpoint cmdlet, which deletes them.

As a result, you can type "del-psb" instead of the longer command.

To save the function, add it to your Windows PowerShell profile.