You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These commands re-enable a breakpoint that has been disabled.
81
-
82
-
The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script.
83
-
Then, it saves the breakpoint object in the $B variable.
93
+
`Set-PSBreakpoint` creates a breakpoint on the **Name** variable in the `Sample.ps1` script saving
94
+
the breakpoint object in the `$B` variable. The **PassThru** parameter displays the value of the
95
+
**Enabled** property of the breakpoint is **False**.
84
96
85
-
The second command uses the Disable-PSBreakpoint cmdlet to disable the new breakpoint.
86
-
It uses a pipeline operator (|) to send the breakpoint object in $B to the **Disable-PSBreakpoint** cmdlet, and it uses the *PassThru* parameter of **Disable-PSBreakpoint** to display the disabled breakpoint object.
87
-
This lets you verify that the value of the Enabled property of the breakpoint object is False.
97
+
`Enable-PSBreakpoint` re-enables the breakpoint and using the **PassThru** parameter to display the
98
+
value of the **Enabled** property is **True**.
88
99
89
-
The third command uses the **Enable-PSBreakpoint** cmdlet to re-enable the breakpoint.
90
-
It uses a pipeline operator (|) to send the breakpoint object in $B to the **Enable-PSBreakpoint** cmdlet, and it uses the *PassThru* parameter of **Enable-PSBreakpoint** to display the breakpoint object.
91
-
This lets you verify that the value of the Enabled property of the breakpoint object is True.
100
+
### Example 4: Enable breakpoints using a variable
92
101
93
-
The results are shown in the following sample output.
102
+
This example enables a set of breakpoints using the breakpoint objects.
94
103
95
-
### Example 4: Enable breakpoints using a variable
104
+
```powershell
105
+
$B = Get-PSBreakpoint -Id 3, 5
106
+
Enable-PSBreakpoint -Breakpoint $B
96
107
```
97
-
PS C:\> $B = Get-PSBreakpoint -Id 3, 5
98
-
PS C:\> Enable-PSBreakpoint -Breakpoint $B
99
-
```
100
-
101
-
These commands enable a set of breakpoints by specifying their breakpoint objects.
102
108
103
-
The first command uses the Get-PSBreakpoint cmdlet to get the breakpoints and saves them in the $B variable.
109
+
`Get-PSBreakpoint` gets breakpoints by ID number and stores them in the `$B` variable.
104
110
105
-
The second command uses the **Enable-PSBreakpoint** cmdlet and its *Breakpoint* parameter to enable the breakpoints.
111
+
`Enable-PSBreakpoint` enables the breakpoints stored in `$B` using the **Breakpoint** parameter.
106
112
107
-
This command is the equivalent of `Enable-PSBreakpoint -Id 3, 5`.
113
+
This example is the equivalent of `Enable-PSBreakpoint -Id 3, 5`.
108
114
109
115
## PARAMETERS
110
116
111
117
### -Breakpoint
112
-
Specifies the breakpoints to enable.
113
-
Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command.
114
-
You can also pipe breakpoint objects to **Enable-PSBreakpoint**.
118
+
119
+
Specifies the breakpoints to enable. Provide a variable or a command, such as `Get-PSBreakpoint`,
120
+
that contains breakpoint objects. You can also pipe breakpoint objects to `Enable-PSBreakpoint`.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
201
+
202
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
You can pipe a breakpoint object to **Enable-PSBreakpoint**.
210
+
211
+
You can pipe a breakpoint object to `Enable-PSBreakpoint`.
201
212
202
213
## OUTPUTS
203
214
204
215
### None or System.Management.Automation.Breakpoint
205
-
When you use the *PassThru* parameter, **Enable-PSBreakpoint** returns a breakpoint object that represent that breakpoint that was enabled.
206
-
Otherwise, this cmdlet does not generate any output.
216
+
217
+
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a result that the breakpoint
218
+
is enabled. Otherwise, this does not generate any output.
207
219
208
220
## NOTES
209
-
* The **Enable-PSBreakpoint** cmdlet does not generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few are disabled.
210
221
211
-
Breakpoints are enabled when you create them by using the Set-PSBreakpoint cmdlet.
212
-
You do not need to enable newly created breakpoints.
222
+
- The `Enable-PSBreakpoint` cmdlet does not generate an error if you try to enable a breakpoint that
223
+
is already enabled. As such, you can enable all breakpoints without error, even when only a few
224
+
are disabled.
213
225
214
-
*
226
+
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You do not
227
+
need to enable newly created breakpoints.
215
228
216
229
## RELATED LINKS
217
230
@@ -224,5 +237,3 @@ You do not need to enable newly created breakpoints.
0 commit comments