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
5.9k
魅せるデバッグ技術
dealforest
4
1.5k
LLDB の世界からみた Swift
dealforest
4
4.9k
Xcode で快適なデバッグライフを追い求める
dealforest
29
22k
Intrducing debug in WWDC2016
dealforest
3
750
swift build と Xcode での Build の違い
dealforest
3
2k
RIP Xcode Plugin 🙏
dealforest
0
4.7k
Introducing Xcode Editor Extension
dealforest
2
4.5k
Introducing Anglerfish
dealforest
2
3.2k
Other Decks in Programming
See All in Programming
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
240
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
900
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1k
Jakarta EE meets AI
ivargrimstad
0
710
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
Click-free releases & the making of a CLI app
oheyadam
2
120
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Code Reviewing Like a Champion
maltzj
520
39k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Site-Speed That Sticks
csswizardry
0
33
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Practical Orchestrator
shlominoach
186
10k
Typedesign – Prime Four
hannesfritz
40
2.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.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ਫ༵