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.
86
90
87
-
The first command uses the Set-PSBreakpoint cmdlet to create a breakpoint on the Name variable in the Sample.ps1 script.
88
-
Then, it saves the breakpoint object in the $B variable.
91
+
The first command uses the `Set-PSBreakpoint` cmdlet to create a breakpoint on the
92
+
Name variable in the Sample.ps1 script. Then, it saves the breakpoint object in
93
+
the $B variable.
89
94
90
-
The second command uses the Disable-PSBreakpoint cmdlet to disable the new breakpoint.
91
-
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.
92
-
This lets you verify that the value of the Enabled property of the breakpoint object is False.
95
+
The second command uses the `Disable-PSBreakpoint` cmdlet to disable the new
96
+
breakpoint. It uses a pipeline operator (|) to send the breakpoint object in $B
97
+
to the `Disable-PSBreakpoint` cmdlet, and it uses the **PassThru** parameter of
98
+
`Disable-PSBreakpoint` to display the disabled breakpoint object. This lets
99
+
you verify that the value of the Enabled property of the breakpoint object is
100
+
False.
93
101
94
-
The third command uses the **Enable-PSBreakpoint** cmdlet to re-enable the breakpoint.
95
-
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.
96
-
This lets you verify that the value of the Enabled property of the breakpoint object is True.
102
+
The third command uses the `Enable-PSBreakpoint` cmdlet to re-enable the
103
+
breakpoint. It uses a pipeline operator (|) to send the breakpoint object in $B
104
+
to the `Enable-PSBreakpoint` cmdlet, and it uses the **PassThru** parameter of
105
+
`Enable-PSBreakpoint` to display the breakpoint object. This lets you verify
106
+
that the value of the Enabled property of the breakpoint object is True.
97
107
98
108
The results are shown in the following sample output.
99
109
100
110
### Example 4: Enable breakpoints using a variable
101
111
102
-
```
112
+
```powershell
103
113
PS C:\> $B = Get-PSBreakpoint -Id 3, 5
104
114
PS C:\> Enable-PSBreakpoint -Breakpoint $B
105
115
```
@@ -108,17 +118,18 @@ These commands enable a set of breakpoints by specifying their breakpoint object
108
118
109
119
The first command uses the Get-PSBreakpoint cmdlet to get the breakpoints and saves them in the $B variable.
110
120
111
-
The second command uses the **Enable-PSBreakpoint** cmdlet and its *Breakpoint* parameter to enable the breakpoints.
121
+
The second command uses the `Enable-PSBreakpoint` cmdlet and its **Breakpoint**
122
+
parameter to enable the breakpoints.
112
123
113
124
This command is the equivalent of `Enable-PSBreakpoint -Id 3, 5`.
114
125
115
126
## PARAMETERS
116
127
117
128
### -Breakpoint
118
129
119
-
Specifies the breakpoints to enable.
120
-
Enter a variable that contains breakpoint objects or a command that gets breakpoint objects, such as a Get-PSBreakpoint command.
121
-
You can also pipe breakpoint objects to **Enable-PSBreakpoint**.
130
+
Specifies the breakpoints to enable. Enter a variable that contains breakpoint
131
+
objects or a command that gets breakpoint objects, such as a `Get-PSBreakpoint`
132
+
command. 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).
218
+
This cmdlet supports the common parameters: -Debug, -ErrorAction,
You can pipe a breakpoint object to **Enable-PSBreakpoint**.
228
+
You can pipe a breakpoint object to `Enable-PSBreakpoint`.
214
229
215
230
## OUTPUTS
216
231
217
232
### None or System.Management.Automation.Breakpoint
218
233
219
-
When you use the *PassThru* parameter, **Enable-PSBreakpoint** returns a breakpoint object that represent that breakpoint that was enabled.
220
-
Otherwise, this cmdlet does not generate any output.
234
+
When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a
235
+
breakpoint object that represent that breakpoint that was enabled. Otherwise,
236
+
this cmdlet does not generate any output.
221
237
222
238
## NOTES
223
239
224
-
* 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.
240
+
- The `Enable-PSBreakpoint` cmdlet does not generate an error if you try to
241
+
enable a breakpoint that is already enabled. As such, you can enable all
242
+
breakpoints without error, even when only a few are disabled.
225
243
226
-
Breakpoints are enabled when you create them by using the Set-PSBreakpoint cmdlet.
244
+
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet.
227
245
You do not need to enable newly created breakpoints.
228
246
229
-
*
230
-
231
247
## RELATED LINKS
232
248
233
249
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
@@ -239,5 +255,3 @@ You do not need to enable newly created breakpoints.
0 commit comments