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
Pythonのデバッガーを使おう
Search
Shinya Okano
June 10, 2023
Technology
980
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pythonのデバッガーを使おう
Shinya Okano
June 10, 2023
More Decks by Shinya Okano
See All by Shinya Okano
プロファイラを使ってPythonアプリをチューニングしよう
tokibito
2
1.5k
Djangoテンプレートエンジンを使いこなそう!
tokibito
0
3.2k
Djangoフレームワークの紹介_OSC北海道2019
tokibito
1
1.1k
DjangoCongressJP開催レポート
tokibito
0
110
Djangoフレームワークの紹介 OSC2018do
tokibito
0
2.9k
Other Decks in Technology
See All in Technology
可視化から始めたAI駆動開発_ochi_ver1.01 / AI-Driven Development Starting with Visualization_ver1.01
yayoi_dd
0
110
DORA_Metrics.pdf
wagnerfusca
1
140
OpenClawでAzure DevOpsのWiki更新を自動化する - クラウドAIだけでは届かない場所へ
yutakaosada
0
130
顧客の成果創出とプロダクトの成長を 両立するためのFDE
sansantech
PRO
0
500
20260915deck.gl-raster を使ってみた
rena1208
0
170
Lambda MicroVMsが分からなすぎたので使い所を1から考えてみた
tsukuboshi
1
250
Swap and Memory Reclaim - Squeezing Out More RAM
ennael
PRO
1
1.4k
Terraformを用いたJamf Pro構成のIaC, GitOps化への挑戦
yukun
0
110
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
210
PQC移行の今 -- IETF からみた現在地
satokan
4
660
セルフサービスのオブザーバビリティ基盤をOpenTelemetryで作る / Building a Self-Service Observability Platform with OpenTelemetry
ymotongpoo
3
480
【データ横丁主催】AI Agentがコンテキストを使って仕事をした後、何が残るのか― 組織の経験を次の判断に引き継ぐ「Agent Memory」
shisyu_gaku
2
270
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Are puppies a ranking factor?
jonoalderson
2
4k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
Docker and Python
trallard
47
4.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
The Pragmatic Product Professional
lauravandoore
37
7.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
390
Transcript
Pythonのデバッガーを 使おう @tokibito
Pythonのプログラムをデバッグする • デバッグ方法は色々 • print関数を入れる? • ロギングlogging.debug関数を使う? • 組み込みのデバッガーpdbモジュール
pdbモジュール • https://docs.python.org/ja/3/library/pdb.html • 標準で入っている • CUIで使える • Pythonがあれば通常どこでも使えるので覚えておくとよい
ブレークポイントをコード内に指定 • 組み込みのbreakpoint()関数 • import pdb; pdb.set_trace()
pdbから起動する • python -m pdb my-script.py
pdbのコマンド • b: ブレークポイント指定 • ファイル名:行番号 • c: ブレークポイントまで継続 •
s: ステップ実行 • l: 現在の実行位置を表示 • n: 次の呼び出しまで進む • q: 終了
pdb以外のデバッガ • ipdb • IPythonのインターフェースなので使いやすい • pudb • CUIだがリッチなデバッガー
他のデバッグ方法 • VSCodeでデバッグする • こちらのほうが手軽