@StasBekman: The Art of Debugging Open Free book is now available in pdf/epub and finally sports a book cover https://github.com/sta…
Summary
Stas Bekman announces the availability of his free open book 'The Art of Debugging' in PDF/EPUB formats, covering debugging methodologies with a focus on Unix, Python, and PyTorch, applicable to any software debugging.
View Cached Full Text
Cached at: 07/01/26, 02:12 PM
The Art of Debugging Open Free book is now available in pdf/epub and finally sports a book cover
https://github.com/stas00/the-art-of-debugging#ebook-versions-of-the-book…
While a lot of the focus is on Unix/Python/Pytorch, the methodology chapter is applicable to any Software Debugging.
It currently sports 161 packed pages in 5 solid chapters and more coming…
stas00/the-art-of-debugging
Source: https://github.com/stas00/the-art-of-debugging
The Art of Debugging Open Book
This evolving book will teach you how to:
- Debug normal issues really fast
- Make complicated issues possible to debug
footnote: adapted from Perl’s slogan: “Easy things should be easy and hard things should be possible”.
This is a work-in-progress collection of methodologies and copy-n-paste recipes for successful debugging of simple and complicated software problems. Some sections are quite complete, while other will be finished at a later stage, and yet other haven’t been started.
Besides debugging methodologies the second focus of this book is on sharing the best tools I have discovered to get the debugging job done successfully, while ideally “losing the least amount of hair” in the process.
Intro
I have been developing software since 1995 and a lot of this work involved debugging. Over the years I developed various efficient methodologies for discovering the source of the problem, which is the most difficult stage before it can be solved. Since after the problem is understood, typically its resolution is at easy reach.
Every so often someone I would be debugging some difficult problem with would suggest to share my approaches with the world. I always said that it’d be too difficult to generalize, but recently the planted seed seems to have sprouted and so in the following chapters I will try to share some of the insights to ease this very difficult at times process.
Writing about debugging in the void is very difficult and since I haven’t been saving use cases, it will take some time to build this up, so expect these pages to be a Work In Progress (WIP) for many moons. But hopefully some ideas could be relayed to you sooner than later, and they would help to ease your burden of debugging in your professional and play projects.
Table of Contents
-
Unix Tools for Debugging -
bash,strace,make, prompt,nohup, etc. -
Debugging Compiled Programs -
gdb,ldd,nm,LD_LIBRARY_PATH,LD_PRELOAD, etc. -
Debugging Python Programs -
py-spy, paths, auto-print, etc. -
Debugging PyTorch Programs - cpu and gpu memory, performance, models, tensors, etc.
-
Debugging Machine Learning Projects (external)
Updates
I announce any significant updates on my twitter channel https://twitter.com/StasBekman.
Ebook versions of the book
You can download various ebook formats of this book:
I will try to rebuild these once in a few weeks or so, but if you want the latest ebook versions, the instructions for building are here.
Machine Learning Engineering Open Book
Make sure to also read Machine Learning Engineering Open Book which has a lot of related recipes and methodologies, in the context of Machine Learning.
Contributing
If you found a bug, typo or would like to propose an improvement please don’t hesitate to open an Issue or contribute a PR.
License
The content of this site is distributed under Attribution-ShareAlike 4.0 International.
My repositories map
✔ Machine Learning: ML Engineering Online Book | ML ways | Porting
✔ Guides: The Art of Debugging
✔ Applications: ipyexperiments
✔ Tools and Cheatsheets: bash | conda | git | jupyter-notebook | make | python | tensorboard | unix
Similar Articles
@StasBekman: As I'm working on the Machine Learning Engineering and the Art of Debugging books, which I tremendously enjoy doing, I …
Stas Bekman is working on books about Machine Learning Engineering and Debugging and wonders if the community will read them, noting they could serve as a skill document for AI.
@eigensteve: I Wrote a New Book!!! Optimization: A Bootcamp for Machine Learning, Inverse Problems, and Control Pre-Order Now (July …
Steven Brunton announces his new book 'Optimization: A Bootcamp for Machine Learning, Inverse Problems, and Control', with pre-order available and accompanying free PDF, YouTube videos, and Python code.
Xavier Leroy's new book on Control Sturctures in Programming
Xavier Leroy announces a new book on control structures in programming languages, covering from goto to algebraic effects, available as a free preview under CC license.
@KirkDBorne: Updated 2204-page PDF Mathematics ebook: "Algebra, Topology, Differential Calculus, and Optimization Theory For Compute…
Updated 2204-page PDF mathematics ebook covering algebra, topology, differential calculus, and optimization theory for computer science and machine learning, released by Jean Gallier and Jocelyn Quaintance.
@Goutamdilesh: 10000+ Pages Programming Notes - FREE ❯ Java http://goalkicker.com/JavaBook/ ❯ Python http://goalkicker.com/PythonBook/…
A collection of free programming notes (PDFs) for Java, Python, JavaScript, SQL, DSA, C, and C++ from GoalKicker.