July 18th, 2015

PowerTip: Set Breakpoint Based on Command

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback