PowerTip: Set Breakpoint Based on Command


Summary: Learn to set a Windows PowerShell breakpoint based on a specific command.

Hey, Scripting Guy! Question How can I configure the Windows PowerShell debugger to start when a script hits a specific command?

Hey, Scripting Guy! Answer Use the Set-PSBreakpoint cmdlet and specify a specific command name, for example:

Set-PSBreakpoint -Command Foreach

Comments (0)

Skip to main content