debugging

Diagnose software defects through structured reproduction, root-cause analysis, and profiling workflows.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/shengmingzhishu/LeeCommonVideoCut --skill debugging-shengmingzhishu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debugging
Source: https://github.com/shengmingzhishu/LeeCommonVideoCut/tree/main/.trae/skills/shared/debugging
Command: npx skills add https://github.com/shengmingzhishu/LeeCommonVideoCut --skill debugging-shengmingzhishu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Complex bugs, performance bottlenecks, and memory leaks often lead to blind trial-and-error fixes that waste time and introduce regressions. This Skill provides a systematic debugging methodology so issues are reproduced, isolated, and fixed with verifiable evidence. ## Core Features & Use Cases - Structured Four-Step Method: Reproduce and scope the issue (frontend/backend/network), collect evidence via logs and breakpoints, run root-cause analysis (5 Whys, bisection, diff comparison), then fix and verify with regression tests. - Full-Stack Debugging Guidance: Backend techniques include trace_id log correlation, pdb/breakpoint usage, and curl-based API checks; frontend techniques cover DevTools Console, Network panel, React DevTools, and Zustand state inspection. - Performance & Memory Profiling: Use cProfile, pstats, and snakeviz for Python performance analysis, memory_profiler for backend leaks, and Chrome DevTools Performance/Memory panels for frontend rendering and heap snapshot comparison. - Use Case: When an API intermittently returns 500 errors, grep logs by trace_id, bisect the failing code path, identify the root cause, and add a regression test before closing the issue. ## Quick Start Use the debugging skill to systematically diagnose why this API endpoint intermittently returns 500 errors and identify the root cause.

Frequently Asked Questions about debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a complex bug systematically instead of guessing?▼

Follow a four-step process: reproduce the issue with minimal conditions, collect evidence through logs and breakpoints, analyze the root cause using 5 Whys or bisection, then fix and verify with a regression test. This avoids blind code changes.

How to profile Python code performance with cProfile?▼

Run cProfile.run('your_function()', 'profile_output.prof') to capture timing data, then inspect results with python -m pstats or visualize them with snakeviz. This identifies which functions consume the most execution time.

How do I tell if a bug is frontend, backend, or network related?▼

Use a scoping matrix: JavaScript console errors indicate frontend issues, HTTP 4xx/5xx responses indicate backend issues, and timeouts or environment-specific failures suggest network problems. Data inaccuracies usually point to the backend.

How to find memory leaks in a React frontend application?▼

Use Chrome DevTools Memory panel to capture and compare heap snapshots over time. Check for common causes: uncleared setInterval/setTimeout timers, unremoved event listeners, and closures retaining references to large objects.

Why should I add a regression test after fixing a bug?▼

A regression test verifies the fix works and prevents the same defect from reappearing in future changes. It converts a one-time debugging effort into permanent protection for the codebase.