Become a PowerShell Debugging Ninja
summary
Lots of concrete debugging moves and the exact tooling to try them: inspect $Error (he primes it with 20 errors), use Format-List -Force to reveal Exception and InnerException, group/sort $Error to find the most common or first error, wrap functions in try/catch and rethrow with the caller’s ErrorActionPreference preserved, set conditional breakpoints with set-PSBreakpoint, use wait-debugger / debug job / enter-pshostprocess for remote runspaces, and install debugpx for niceties that actually work in demos.
AI-written summary · about
chapters (28)
- 0:00Introduction
- 2:35Questions
- 4:50Change the Error Message Color
- 6:35Clear the Error Variable
- 7:50The Bottom View
- 9:30Force
- 10:10Script Stack Trace
- 11:30Exception
- 12:30Inner Exceptions
- 13:40Stack Trace
- 14:45Exceptions
- 16:15Why Format
- 19:15Clear Error Stack
- 20:00Traces
- 21:30Error Handling
- 24:30Trap
- 25:10Joel Bennet
- 29:10TerminateError
- 39:30Invocation Info
- 40:55Error Record
- 42:50Soft Skills
- 43:10Functions
- 44:35Naked Catch Statements
- 45:15Debugging
- 47:35Debugging Commands
- 55:10SetPSBreakpoint
- 56:20Step Into
- 57:55Run
related talks
39mDebug Now! Zap bugs out of PowerShell
23mDebugging that bugger : Cleanly handling the errors
35mBe Smug, Debug Why You Should Be a Delve Power User
43mDebug Like a Scientist!
29mFilling the Knowledge Gap: Debugging Edition
03h 02mPowerShell Unit and Infrastructure Testing
36mDebugging War Stories & Strategies to Survive
02h 36mAdvanced Functions and Parameter Techniques
