Debug Now! Zap bugs out of PowerShell
summary
A codebase with 2% → 80% coverage target gets concrete rules: mandatory Pester tests on PRs, guidelines for meaningful coverage, and documentation plus enablement sessions to onboard contributors; a commented-out test later proves it caught a real bug. Debugging uses ErrorAction Stop, selective catch for DriveNotFoundException, inspection via $Error[0] and ConvertTo-Json, plus legacy Set-PSDebug and VS Code breakpoints for stepping through scopes and variables to reproduce and fix failures.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 2:31PowerShell testing with Pester
- 15:14Error handling in PowerShell
- 24:41Debugging in VS Code
- 37:54Summary and Q&A
related talks
01h 47mBecome a PowerShell Debugging Ninja
03h 02mPowerShell Unit and Infrastructure Testing
35mBe Smug, Debug Why You Should Be a Delve Power User
36mBeyond Pester 101: Applying testing principles to PowerShell
43mDebug Like a Scientist!
48mHow to Love Unit Testing
36mCode Analysis: Empowering developers to write performant, reliable, and safe C++
41mDebugger Driven Developement with Pry
