What is the Powershell equivalent of `set -x` to print each command before execution?

Viewed 725

For debugging purposes I would like to easily know which commands are responsible for various parts of the output, I could manage with enough echo sprinkled around, but a easily set option would be best.

1 Answers

As explained in PowerShell "echo on" the solution is to run Set-PSDebug -Trace 1 or Set-PSDebug -Trace 2 in your script.

Related