systematic-debugging

Solid

Debugging methodology, hypothesis testing, reading stack traces, isolating issues. Use when facing an unexpected bug, a flaky test, a production incident, or any situation where the cause isn't immediately obvious.

Code & Development 30 stars 9 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
50
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Systematic Debugging ## The Scientific Method Applied to Bugs ``` 1. OBSERVE — Reproduce the issue reliably 2. HYPOTHESIZE — Form the simplest explanation consistent with symptoms 3. PREDICT — "If my hypothesis is correct, then X should be true" 4. TEST — Run an experiment to falsify the hypothesis 5. CONCLUDE — If wrong, refine hypothesis and repeat ``` Never jump to a fix before you understand the cause. A fix without understanding is guessing. ## Step 1: Reproduce Reliably You cannot debug a bug you cannot reproduce. ```bash # Note the exact conditions: # - Input / request body # - Environment (local / staging / prod) # - User account or data state # - Frequency (always / sometimes / once) # - When it started (after which deploy?) # Find the last good commit git bisect start git bisect bad HEAD git bisect good v1.2.3 # last known good tag # git bisect then checks out midpoints — test and mark good/bad ``` ## Step 2: Read the Stack Trace ``` Error: Cannot read properties of undefined (reading 'email') at UserService.findOneOrFail (/src/users/users.service.ts:42:23) at UsersController.findOne (/src/users/users.controller.ts:28:31) at ... Reading strategy: 1. Top line: the actual error — read it carefully word by word 2. First frame after your code: where it crashed (users.service.ts:42) 3. Frame above that: what called it (users.controller.ts:28) 4. Ignore node_modules frames unless diagnosing a library issue ``` ```typescript // users.se...

Details

Author
sabahattink
Repository
sabahattink/antigravity-fullstack-hq
Created
8 months ago
Last Updated
5 days ago
Language
PowerShell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category