April 7, 2010

How to trace a script execution ?

To trace execution of every line, every function call and every variable affection in a script type the following command before running your script :

set-psdebug -trace 2 -step

To set thing back to normal :

set-psdebug -off

No comments:

Post a Comment