Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2017 - Peter Hadlaw - Intro to pdb
Search
PyBay
August 13, 2017
Programming
170
0
Share
2017 - Peter Hadlaw - Intro to pdb
PyBay
August 13, 2017
More Decks by PyBay
See All by PyBay
2017 - The Packaging Gradient
pybay
2
1k
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
720
2017 - Bringing Python 3 to LinkedIn
pybay
1
600
2017 - Python Debugging with PUDB
pybay
0
790
2017 - Opening up to Open Source
pybay
0
290
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
230
2017 - Performant Asynchronous Programming at Quora
pybay
1
410
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
580
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
730
Other Decks in Programming
See All in Programming
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
160
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
130
Swift Concurrency Type System
inamiy
0
350
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
330
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
220
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
170
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
180
Java 21/25 Virtual Threads 소개
debop
0
330
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
830
アーキテクチャモダナイゼーションとは何か
nwiizo
17
4.5k
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
130
Featured
See All Featured
We Are The Robots
honzajavorek
0
210
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Chasing Engaging Ingredients in Design
codingconduct
0
160
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.6k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
480
Scaling GitHub
holman
464
140k
Building Applications with DynamoDB
mza
96
7k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
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