CmdID / PowerShell / Cmdlets / Enable
Enable-PSBreakpoint
Enables the breakpoints in the current console. PowerShell reference
From the PowerShell reference
5 parameters
Alias ebp
What it does
Enables the breakpoints in the current console. The Enable-PSBreakpoint cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs. A breakpoint is a point in a script where execution stops temporarily so that you can examine the state of the script. Newly created breakpoints are automatically enabled, but can be disabled using Disable-PSBreakpoint. Technically, this cmdlet changes the value of the Enabled property of a breakpoint object to True. Enable-PSBreakpoint is one of several cmdlets designed for debugging PowerShell scripts. For more information about the PowerShell debugger, see about_Debuggers.
Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Enable all breakpoints
Get-PSBreakpoint | Enable-PSBreakpointIdentifyEnable breakpoints by ID
Enable-PSBreakpoint -Id 0, 1, 5IdentifyEnable a disabled breakpoint
$B = Set-PSBreakpoint -Script "sample.ps1" -Variable Name -PassThru
$B | Enable-PSBreakpoint -PassThruIdentifyEnable breakpoints using a variable
$B = Get-PSBreakpoint -Id 3, 5
Enable-PSBreakpoint -Breakpoint $BIdentifyIts page in the reference: Enable-PSBreakpoint.
Parameters
-BreakpointSpecifies the breakpoints to enable. Provide a variable containing breakpoints or a command that gets breakpoint objects, such as Get-PSBreakpoint. You can also pipe breakpoint objects to Enable-PSBreakpoint.-IdSpecifies the Id numbers of the breakpoints to enable. The default value is all breakpoints. Provide the Id by number or in a variable. You can't pipe Id numbers to Enable-PSBreakpoint. To find the Id of a breakpoint, use the Get-PSBreakpoint cmdlet.-PassThruReturns an object representing the breakpoint being enabled. By default, this cmdlet doesn't generate any output.-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet isn't run.