PowerTip: Set Breakpoint Based on Command
Summary: Learn to set a Windows PowerShell breakpoint based on a specific command.
How can I configure the Windows PowerShell debugger to start when a script hits a specific command?
Use the Set-PSBreakpoint cmdlet and specify a specific command name, for example:
Set-PSBreakpoint -Command Foreach