Deletes breakpoints from the current console. (Remove-PSBreakpoint)

   

# NAME
Remove-PSBreakpoint

# SYNOPSIS
Deletes breakpoints from the current console.

# SYNTAX
Remove-PSBreakpoint [-Id] <Int32[]> [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-Confirm] [-WhatIf] [<CommonParameters>]

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

# PARAMETERS
-Breakpoint <Breakpoint[]>
Specifies the breakpoints to delete. Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command. You can also pipe breakpoint objects to Remove-PSBreakpoint.

Required? true
Position? 1
Default value None
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Id <Int32[]>
Deletes breakpoints with the specified breakpoint IDs.

Required? true
Position? 1
Default value None
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
Describes what would happen if you executed the command without actually executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
System.Management.Automation.Breakpoint
You can pipe breakpoint objects to Remove-PSBreakpoint.

# OUTPUTS
None
The cmdlet does not generate any output.

# NOTES

# EXAMPLE 1

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

# Description
-----------
This command deletes all of the breakpoints in the current console.

# EXAMPLE 2

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

C:\PS> $b | remove-psbreakpoint

# Description
-----------
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

C:\PS>remove-psbreakpoint -id 2

# Description
-----------
This command deletes the breakpoint with breakpoint ID 2.

# EXAMPLE 4

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

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

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113375
about_Debuggers
Set-PSBreakpoint
Get-PSBreakpoint
Enable-PSBreakpoint
Disable-PSBreakpoint
Get-PSCallStack

C:\Windows>powershell get-help Enable-PSBreakpoint -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole









... Windows-10




Windows 10 How To

... Windows 10 FAQ
... Windows 10 How To




PowerShell: Deletes breakpoints from the current console.

HTTP: ... PS_Windows/en/Remove-PSBreakpoint.htm
0.218
12669

Was Sind Kennwortrichtlinien?

 /

Difference bit rate and sample rate (sampling rate)?

 /

What does Reboot immediately in The File Unlocker?

 /

Always Mouse Wheel for no focus Windows on all MS OS!

 /

Windows 11 quickly switch to standby mode or the monitor turns off?

 /

Windows-10/11 tool to change the color profile for a device, where is it? (printer, fax)

 /

Can I create a system image on Windows 10 / 11 (backup and restore)?

 /

Top Secret and hidden Commands for Windows 11/10 Explorer!

 /

Modify directory Columns / Save in Quad Explorer on Windows 10, 8.1, ...!

 /

Frage! Windows 10 Testseite drucken, aber wie?

 /

Up Down Rename The next File or Folder!

 /

Load and save the Windows 10 start menu with PowerShell!

 /