stas00/the-art-of-debugging logo

stas00/the-art-of-debugging

Free

The Art of Debugging

FreeFree tier
Type
Open Source
LinksX

About stas00/the-art-of-debugging

The Art of Debugging is an evolving open book that teaches efficient methodologies for debugging software problems. It covers fast debugging of normal issues and making complicated issues tractable. The book is a work-in-progress collection of methodologies and copy-paste recipes for simple and complex software problems, with a focus on sharing the best tools to minimize hair loss during debugging. Topics include Unix debugging tools (bash, strace, make), debugging compiled programs (gdb, ldd), Python debugging (py-spy, paths), PyTorch debugging (CPU and GPU memory, performance), and machine learning projects. The repository also includes a SKILL.md file for AI agents to improve their debugging capabilities.

Key Features

Fast debugging methodologies for normal and complicated issues
Unix debugging tools: bash, strace, make, nohup, etc.
Debugging compiled programs with gdb, ldd, LD_LIBRARY_PATH, LD_PRELOAD
Python debugging techniques: py-spy, auto-print, paths
PyTorch debugging: CPU/GPU memory, performance, models, tensors
Debugging machine learning projects (external section)
SKILL.md file to teach AI agents debugging skills
Free and open source (CC-BY-SA license)

Pros & Cons

Pros
  • Comprehensive coverage across multiple programming domains and paradigms
  • Practical recipes that can be directly applied
  • Free and open source with permissive license
  • Includes a skill file specifically designed to enhance AI debugging
  • Regularly updated and maintained
Cons
  • Work in progress with some sections unfinished
  • Assumes existing programming and debugging experience
  • No interactive or video content, only text-based
  • Limited to methodologies and recipes, not a debugger tool itself

Best For

Quickly resolving common software bugsTackling complex and hard-to-reproduce issuesLearning systematic debugging approachesUsing specific tools like strace, gdb, or py-spy for diagnosticsDebugging Python and PyTorch programsTraining AI agents to debug code via SKILL.md

FAQ

What is The Art of Debugging?
It is an evolving open book that provides methodologies and copy-paste recipes for debugging software problems efficiently. It covers tools and techniques for normal and complex issues across Unix, compiled programs, Python, PyTorch, and machine learning projects.
Is it free?
Yes, it is open source and licensed under CC-BY-SA.
What topics are covered in the book?
The book covers fast debugging methodology, Unix debugging tools, debugging compiled programs (C/C++), debugging Python programs, debugging PyTorch programs, and debugging machine learning projects. It also includes a SKILL.md file for AI agents.
How can I contribute?
If you find a bug, typo, or have an improvement, you can propose it via the GitHub repository. Contributions are welcome.