Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
2017 - Peter Hadlaw - Intro to pdb
Search
PyBay
August 13, 2017
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2017 - Peter Hadlaw - Intro to pdb
PyBay
August 13, 2017
More Decks by PyBay
See All by PyBay
2017 - The Packaging Gradient
pybay
2
1.1k
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
770
2017 - Bringing Python 3 to LinkedIn
pybay
1
650
2017 - Python Debugging with PUDB
pybay
0
850
2017 - Opening up to Open Source
pybay
0
330
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
260
2017 - Performant Asynchronous Programming at Quora
pybay
1
460
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
640
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
780
Other Decks in Programming
See All in Programming
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
820
Spec-driven Development with AI
simas
PRO
0
2.2k
AI Augmentation Techniques with Liberty
ivargrimstad
0
270
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
400
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
680
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
6.1k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
190
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
130
SODA - FACT BOOK(EN)
sodainc
1
200
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.3k
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.4k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.6k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
How STYLIGHT went responsive
nonsquared
100
6.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
340
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
660
sira's awesome portfolio website redesign presentation
elsirapls
0
490
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
290
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Transcript
INTRO TO pdb Peter Hadlaw @ Tesorio August 13, 2017
https://www.tesorio.com/careers
TOO OFTEN I SEE... print foo print foo['bar'] print fizz.buzz()
...
CONS: Limited (can't interrupt execution) Messy (lot's of clean up)
Zero interactivity (need to modify code and run everything again) Much harder to dive deeper into third party code (internal or external alike)
DEBUGGER Exist in many languages and platforms Python's built-in debugger
is... "A computer program that assists in the detection and correction of errors in computer programs."
pdb
THREE EASY STEPS 1. Set a breakpoint 2. Run program
3. Execution halts at breakpoint and now, you, interact
SETTING A BREAKPOINT import pdb; pdb.set_trace() Using a one liner
is a nice habit to make clean up easier (e.g. a single dd in vi).
api.py
RUN PROGRAM
l - LIST COMMAND
EXPRESSIONS
n - NEXT COMMAND
s - STEP COMMAND
c - CONTINUE COMMAND
GENERAL FLOW Use l to orient yourself and inspect what
code is currently being executed. Use n to step forward in execution Use s to dive deeper Create expressions for the debugger to evaluate and gain insights into what's happening c to continue execution until next breakpoint / finish Profit.
NOTES More commands and features available iPython version, much more
powerful (has to be installed separately) Other languages have debuggers to, for example JavaScript in the browser, or C (gdb)
WE'RE HIRING https://www.tesorio.com/careers