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.8k
魅せるデバッグ技術
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
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
23
11k
Vue.js学習の振り返り
hiro_xre
2
130
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
910
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.2k
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
Piniaの現状と今後
waka292
5
1.5k
Outline View in SwiftUI
1024jp
1
110
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
360
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Six Lessons from altMBA
skipperchong
26
3.5k
For a Future-Friendly Web
brad_frost
175
9.4k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Measuring & Analyzing Core Web Vitals
bluesmoon
1
40
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Writing Fast Ruby
sferik
626
61k
BBQ
matthewcrist
85
9.3k
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ਫ༵