

I can use the normal debugger commands to step into, step over, list the call stack, or other actions that are detailed in the following table. The output pane (normally the middle pane) shows that the script is in debugger mode, and it displays the current output. I can use the immediate window (the execution pane that is normally the bottom pane) to type commands for the debugger. When I run the script and the breakpoint is hit, the script enters debugger mode. Once I have saved the script with a file name, I can select a line, and use the Toggle Breakpoint action from the Debug menu to set a breakpoint on the specific line. For example, if I am working on a Windows PowerShell script, but I have not yet saved the script with a file name, I cannot set a breakpoint this option is not available. One thing to keep in mind when you are working with the debugger in the Windows PowerShell ISE, is that it is still the same Windows PowerShell debugger. I also talked about specifying an action to take when a breakpoint is reached.

Next, I talked about setting breakpoints on variables and examining the variables from inside the debugger. I discussed setting breakpoints on scripts by using the Set-PSBreakPoint cmdlet. In the first article, I talked about working at the Windows PowerShell console and using the Windows PowerShell debugger to help with debugging scripts. This is actually the third article this week in which I talk about using Windows PowerShell to debug scripts. Today I want to talk a little bit about using the Windows PowerShell ISE to debug a script. Microsoft Scripting Guy, Ed Wilson, is here. Summary: Learn how to use the debugging tools in the Windows PowerShell ISE to speed development of scripts.
