Remove-PSBreakpoint
Deletes breakpoints from the current console.
Sintaxis
Breakpoint (Es el valor predeterminado).
Remove-PSBreakpoint
[-Breakpoint] <Breakpoint[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Id
Remove-PSBreakpoint
[-Id] <Int32[]>
[-WhatIf]
[-Confirm]
[<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 PowerShell scripts. For more
information about the PowerShell debugger, see
about_Debuggers.
Ejemplos
Example 1: Remove all breakpoints
This command deletes all of the breakpoints in the current console.
Get-PSBreakpoint | Remove-PSBreakpoint
Example 2: Remove a specified breakpoint
This command deletes a breakpoint.
$B = Set-PSBreakpoint -Script "sample.ps1" -Variable "Name"
$B | Remove-PSBreakpoint
The Set-PSBreakpoint
cmdlet creates a breakpoint on the $Name
variable in the Sample.ps1
script and saves the breakpoint object in the $B
variable. The Remove-PSBreakpoint
cmdlet
deletes 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: Remove a breakpoint by ID
This command deletes the breakpoint with breakpoint ID 2.
Remove-PSBreakpoint -Id 2
Example 4: Use a function to remove all breakpoints
This simple function deletes all of the breakpoints in the current console.
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
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.
Parámetros
-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
.
Propiedades del parámetro
Tipo: | |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
Breakpoint
Posición: | 0 |
Mandatory: | True |
Valor de la canalización: | True |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Propiedades del parámetro
Tipo: | SwitchParameter |
Valor predeterminado: | False |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | cf |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-Id
Specifies breakpoint IDs for which this cmdlet deletes breakpoints.
Propiedades del parámetro
Tipo: | Int32[] |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
Id
Posición: | 0 |
Mandatory: | True |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | True |
Valor de los argumentos restantes: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Propiedades del parámetro
Tipo: | SwitchParameter |
Valor predeterminado: | False |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | wi |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Entradas
Breakpoint
You can pipe breakpoint objects to this cmdlet.
Int32
Runspace
Salidas
None
This cmdlet returns no output.
Notas
Windows PowerShell includes the following aliases for Remove-PSBreakpoint
:
rbp