Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Set PowerShell Breakpoint Based on Variable

$
0
0

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


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>