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
200
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
760
2017 - Bringing Python 3 to LinkedIn
pybay
1
640
2017 - Python Debugging with PUDB
pybay
0
850
2017 - Opening up to Open Source
pybay
0
320
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
630
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
780
Other Decks in Programming
See All in Programming
気持ちぃ〜角丸 Squircle
ryu1013
0
280
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
360
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
sbt 2.0: takeoff
eed3si9n
0
140
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
160
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
560
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
カツオ、ご期待ください
suneo3476
0
170
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
380
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
150
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Crafting Experiences
bethany
1
380
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Balancing Empowerment & Direction
lara
6
1.3k
HDC tutorial
michielstock
2
950
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Claude Code のすすめ
schroneko
67
230k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
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