18.8. Summary

Debugging in Windows PowerShell is, like debugging in any other language, something of a black art. I discussed how simple syntax errors could cause potentially puzzling and sometimes silent errors.

This chapter introduced you to the set-psdebug cmdlet that allows you to set the volume of debugging information that is displayed. It also introduced the write-debug cmdlet, which allows you to output custom debug information, and showed you how to use the $DebugPreference variable to vary how write-debug statements are handled. In addition, it briefly described the trace-command, set-tracesource, and get-tracesource cmdlets.

Get Professional Windows® PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.