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
Debugger の Tips
Search
Toshihiro Morimoto
November 13, 2013
Programming
9
11k
Debugger の Tips
Toshihiro Morimoto
November 13, 2013
Tweet
Share
More Decks by Toshihiro Morimoto
See All by Toshihiro Morimoto
Xcode8 で開発はどうかわったのか
dealforest
10
6.1k
魅せるデバッグ技術
dealforest
4
1.5k
LLDB の世界からみた Swift
dealforest
4
5.1k
Xcode で快適なデバッグライフを追い求める
dealforest
29
23k
Intrducing debug in WWDC2016
dealforest
3
760
swift build と Xcode での Build の違い
dealforest
3
2k
RIP Xcode Plugin 🙏
dealforest
0
4.7k
Introducing Xcode Editor Extension
dealforest
2
4.6k
Introducing Anglerfish
dealforest
2
3.3k
Other Decks in Programming
See All in Programming
ts-morph実践:型を利用するcodemodのテクニック
ypresto
1
540
型付け力を強化するための Hoogle のすゝめ / Boosting Your Type Mastery with Hoogle
guvalif
1
230
tsconfigのオプションで変わる型世界
keisukeikeda
1
130
鯛変だったRubyKaigi 2025 ── それでも楽しかった!
pndcat
0
130
CRUD から CQRS へ ~ 分離が可能にする柔軟性
tkawae
0
220
「MCPを使ってる人」が より詳しくなるための解説
yamaguchidesu
0
600
❄️ tmux-nixの実装を通して学ぶNixOSモジュール
momeemt
1
120
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
1
660
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.6k
マテリアルって何者?RealityKitで扱うマテリアル入門
nao_randd
0
140
衛星の軌道をWeb地図上に表示する
sankichi92
0
250
漸進。
ssssota
0
1.1k
Featured
See All Featured
Speed Design
sergeychernyshev
30
970
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Visualization
eitanlees
146
16k
We Have a Design System, Now What?
morganepeng
52
7.6k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Scaling GitHub
holman
459
140k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Site-Speed That Sticks
csswizardry
7
590
Fireside Chat
paigeccino
37
3.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Transcript
Debugger ͷ Tips @dealforest Toshihro Morimoto 2013/11/13 potatotips #1 1311݄13ਫ༵
ࣗݾհ http://about.me/dealforest iOS APP / Web Application(perl, ruby) / Flash
@dealforest Toshihro Morimoto 1311݄13ਫ༵
Xcode ͷίϯιʔϧ্Ͱ͍ϝιουΛ ೖྗͨ͠ΓΊΜͲ͘͘͞ͳ͍Ͱ͔͢ʁ 1311݄13ਫ༵
1311݄13ਫ༵
recursiveDescription ʑ 1311݄13ਫ༵
ิ͞Εͳ͍ͷͰ Α͘λΠϙ͠·͢ 1311݄13ਫ༵
(lldb) po [[[UIApplication sharedApplication] keyWindow] recursiveDescription] (lldb) po [self.view recursiveDescription]
1311݄13ਫ༵
ͳ͕͍... 1311݄13ਫ༵
͜Μͳͷ ͏ͬͯΒΕͳ͍... 1311݄13ਫ༵
ͰͲ͏͢Εղܾ Ͱ͖Δͷ͔ 1311݄13ਫ༵
GDB, LLDB Ͱ Command Λఆٛ͠ ͯΕ͍͍ͷͰ͢ 1311݄13ਫ༵
Commannd ͱ p po(print-object) ͷ͜ͱͰ͢ 1311݄13ਫ༵
Debugger ʹΑͬͯఆٛͷ ํ͕͔ΘΓ·͢ 1311݄13ਫ༵
ࠓճఆٛ͢Δ Command •pv ίϚϯυΛఆٛ • (lldb) pv • po [[[UIApplication
sharedApplication] keyWindow] recursiveDescription] ɹ Λ࣮ߦ • (lldb) pv self.view • po [self.view recursiveDescription] Λ࣮ߦ 1311݄13ਫ༵
GDB ͷ߹ ~/.gdbinit define pv if $argc == 0 po
[[[UIApplication sharedApplication] keyWindow] recursiveDescription] end if $argc == 1 po [$arg0 recursiveDescription] end end 1311݄13ਫ༵
LLDB ͷ߹ ~/.lldbinit command regex pv \ 's/^[[:space:]]*$/ po [[[UIApplication
sharedApplication] keyWindow] recursiveDescription]/' \ 's/^(.+)$/ po [%1 recursiveDescription]/' 1311݄13ਫ༵
(lldb) pv (lldb) pv self.view 1311݄13ਫ༵
\(^o^)/λΠϙ 1311݄13ਫ༵
ଞʹศརͳ Command ~/.gdbinit define st po [NSThread callStackSymbols] end ~/.lldbinit
command regex st 's/^[[:space:]]*$/po [NSThread callStackSymbols]/' stacktrace Λදࣔ͢Δ 1311݄13ਫ༵
(lldb) st 1311݄13ਫ༵
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 1311݄13ਫ༵