Tip: Explore New Cmdlets for Debugging in Windows PowerShell 2.0
The new debugging features in Windows PowerShell 2.0 make the Set-PSDebug cmdlet seem rudimentary or even cumbersome. When you become more familiar with the new debugging features, you might decide to never use Set-PSDebug again.
Several new cmdlets were created to enable debugging from both the Windows PowerShell console and from the Windows PowerShell Integrated Scripting Environment (ISE). Here is an overview of the new debugging cmdlets:
Set-PSBreakpoint Sets breakpoints on lines, variables, and commands.
Get-PSBreakpoint Gets breakpoints in the current session.
Disable-PSBreakpoint Turns off breakpoints in the current session.
Enable-PSBreakpoint Re-enables breakpoints in the current session.
Remove-PSBreakpoint Deletes breakpoints from the current session.
Get-PSCallStack Displays the current call stack.