PowerTip: Set PowerShell Breakpoint Based on Variable

Doctor Scripto

Summary: Set a Windows PowerShell breakpoint based on a variable.

Hey, Scripting Guy! Question How can I enter the Windows PowerShell debugger when a particular variable is accessed in a specific
           Windows PowerShell script?

Hey, Scripting Guy! Answer Set a breakpoint and specify a particular variable and script, for example:

Set-PSBreakpoint -Variable num -Mode write -Script C:\FSO\BadScript.ps1


Discussion is closed.

Feedback usabilla icon