~/talk

Debug Now! Zap bugs out of PowerShell

Talkat PowerShell + DevOps Global Summit 2022 · 2022-04-25..04-28· [testing]
slides:none on file

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

  1. 0:00Introduction
  2. 2:31PowerShell testing with Pester
  3. 15:14Error handling in PowerShell
  4. 24:41Debugging in VS Code
  5. 37:54Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.