O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18 quick reference

To

Do this

Step through a script or a function

Use the Set-PSDebug cmdlet and specify the -step switch.

Follow code execution into and out of functions in a script

Use the Set-PSDebug cmdlet and specify a value of 2 for the -trace parameter.

Set a breakpoint for a particular line number in a script

Use the Set-PSBreakPoint cmdlet and specify the line number to the -line parameter. Also specify the script by using the -script parameter.

Set a breakpoint on a script when a particular variable is written to

Use the Set-PSBreakPoint cmdlet, specify the variable name (leave off the $ sign when specifying the variable name) to the -variable parameter, and specify the script to the -name parameter.

Set a breakpoint when ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required