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.3k
Other Decks in Programming
See All in Programming
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
470
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
270
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
460
42 best practices for Symfony, a decade later
tucksaun
1
180
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
talk-with-local-llm-with-web-streams-api
kbaba1001
0
180
return文におけるstd::moveについて
onihusube
1
1.1k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
KATA
mclloyd
29
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
A Tale of Four Properties
chriscoyier
157
23k
Facilitating Awesome Meetings
lara
50
6.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Fireside Chat
paigeccino
34
3.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
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ਫ༵