Manage Breakpoints in Windows PowerShell ISE
How to add and remove breakpoints for debugging in the Windows PowerShell ISE?
A breakpoint is a designated spot in a script where you would like operation to pause so that you can examine the current state of the variables and the environment in which your script is running. Once your script is paused by a breakpoint, you can run commands in the Console Pane to examine the state of your script. You can output variables or run other commands. You can even modify the value of any variables that are visible to the context of the currently running script. After you have examined what you want to see, you can resume operation of the script.
You can set three types of breakpoints in the Windows PowerShell debugging environment:
Line breakpoint - The script pauses when the designated line is reached during the operation of the script
Variable breakpoint - The script pauses whenever the designated variable’s value changes.
Command breakpoint - The script pauses whenever the designated command is about to be run during the operation of the script. It can include parameters to further filter the breakpoint to only the operation you want. The command can also be a function you created.
To set a line breakpoint - A breakpoint can be set in a script only after it has been saved. Right-click the line where you want to set a line breakpoint, and then click Toggle Breakpoint. Or, click the line where you want to set a line breakpoint, and press F9 or, on the Debug menu, click Toggle Breakpoint.
Remove a line breakpoint Removing a breakpoint deletes it. If you think you might want to use it again later, consider disabling it instead. Right-click the line where you want to remove a breakpoint, and then click Toggle Breakpoint. Or, click the line where you want to remove a breakpoint, and on the Debug menu, click Toggle Breakpoint.
2016-10-04, 413👍, 0💬
What is "User Profile Service" in my Windows 7 service list? And how is "User Profile Service" servi...
What is the file extension .IFO on a DVD-Video disc? .IFO is the file extension used on a DVD-Video ...
What is a startup application on your Windows system? A startup application is a software applicatio...
What is Apache server? Apache server is an open-source free Web server software that runs websites. ...
I'm trying to upload pictures from my Samsung camera and Windows 8 keep saying "Something went wrong...