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
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
Realtime API 入門
riofujimon
0
150
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
イベント駆動で成長して委員会
happymana
1
320
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
as(型アサーション)を書く前にできること
marokanatani
10
2.6k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Featured
See All Featured
Optimizing for Happiness
mojombo
376
70k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Making Projects Easy
brettharned
115
5.9k
Producing Creativity
orderedlist
PRO
341
39k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
[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ਫ༵