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
スクショから始まるデバッグについて
Search
Toshihiro Morimoto
September 27, 2014
Technology
2
3.6k
スクショから始まるデバッグについて
yidev#16 の発表です
Toshihiro Morimoto
September 27, 2014
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 Technology
See All in Technology
TypeScript、上達の瞬間
sadnessojisan
48
14k
複雑なState管理からの脱却
sansantech
PRO
1
160
Chasing the White Whale of Open Source - ROI
mrbobbytables
0
110
Engineer Career Talk
lycorp_recruit_jp
0
200
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
200
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
200
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.4k
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
150
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
420
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
720
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
120
【LT】ソフトウェア産業は進化しているのか? #Agilejapan
takabow
0
110
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
510
110k
4 Signs Your Business is Dying
shpigford
180
21k
We Have a Design System, Now What?
morganepeng
50
7.2k
Six Lessons from altMBA
skipperchong
27
3.5k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Designing Experiences People Love
moore
138
23k
For a Future-Friendly Web
brad_frost
175
9.4k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Visualization
eitanlees
145
15k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Adopting Sorbet at Scale
ufuk
73
9.1k
Transcript
εΫγϣ͔Β࢝·Δσόοάʹ͍ͭͯ 2014/09/27 yidev #16 @dealforest Toshihro Morimoto
ࣗݾհ http://about.me/dealforest ! ! iOS App / Web Application(perl, ruby)
@dealforest Toshihro Morimoto
ͦͦ σόοά͢Δ࣌ͲΜͳͱ͖ʁ
ҙਤͨ͠ڍಈͱҧ͏ͱ͖ʂʂ
։ൃͷαΠΫϧ 1. iPhone Simulator 2. ࣮ػ 3. CI 4. Adhock
Ͱ 5. TestFlight ͰϦϦʔεલʹΠϯετʔϧ 6. AppStore ͔ΒΠϯετʔϧ
։ൃͷαΠΫϧ 1. iPhone Simulator 2. ࣮ػ 3. CI 4. Adhock
Ͱ 5. TestFlight ͰϦϦʔεલʹΠϯετʔϧ 6. AppStore ͔ΒΠϯετʔϧ
։ൃͷαΠΫϧ 1. iPhone Simulator 2. ࣮ػ 3. CI 4. Adhock
Ͱ 5. TestFlight ͰϦϦʔεલʹΠϯετʔϧ 6. AppStore ͔ΒΠϯετʔϧ қ
σόοάͷαΠΫϧ
σόοάͷαΠΫϧ 1. σόοάͷͨΊͷใΛݩʹͯ͠ όάͷݪҼΛਪଌ͢Δ
σόοάͷαΠΫϧ 1. σόοάͷͨΊͷใΛݩʹͯ͠ όάͷݪҼΛਪଌ͢Δ 2. όάΛ࠶ݱͤ͞Δ
σόοάͷαΠΫϧ 1. σόοάͷͨΊͷใΛݩʹͯ͠ όάͷݪҼΛਪଌ͢Δ 2. όάΛ࠶ݱͤ͞Δ 3. Let’s debug…debug…debug!!!
όάͷݪҼΛਪଌ͠Α͏ʹ ใ͕Կͳ͍ͱצͰௐΔ͔͠ͳ͍
Δؾ͕͓͖ͳ͍…
ͨ࣌͠ σόοάͷͨΊͷใ͕ ͞Βʹগͳ͍ʂʂʂ
ͨ࣌͠ͷσόοάͷΈ
ͨ࣌͠ͷσόοάͷΈ • print debug break point ʹΑΔσόο ά͕΄΅ෆՄೳ
ͨ࣌͠ͷσόοάͷΈ • print debug break point ʹΑΔσόο ά͕΄΅ෆՄೳ •
ใʹґଘ͍ͯ͠Δ߹ɺঢ়گΛ ਪଌͯ͠σόοά͠ͳ͍ͱ͍͚ͳ͍
ͨ࣌͠ͷσόοάͷΈ • print debug break point ʹΑΔσόο ά͕΄΅ෆՄೳ •
ใʹґଘ͍ͯ͠Δ߹ɺঢ়گΛ ਪଌͯ͠σόοά͠ͳ͍ͱ͍͚ͳ͍ • όά͕࠶ݱՄೳͳͰσόοάͰ͖ ΔΘ͚Ͱͳ͍
ͭΒ͍…
ͱ͍͑ ใ͕গͳ͍͚Ͳόά͕ ࠶ݱͰ͖ΕͲ͏ʹ͔ͳΔʂ
ͨͩʹґଘͨ͠ΓͰ ࠶ݱ͠ͳ͔ͬͨΓ͢Δͷ͕ݱ࣮
ͨ͠ࡍʹͲ͏ͬͯ σόοάͷͨΊͷใΛऩू͢Δ͔
Crash Report ͷऩू
Crash Report ͷऩू • Crash Report ղੳαʔϏεΛָ͑ʹूΊΕΔ
Crash Report ͷऩू • Crash Report ղੳαʔϏεΛָ͑ʹूΊΕΔ • Clashlitics, Bugsnag
ͳͲ
Crash Report ͷऩू • Crash Report ղੳαʔϏεΛָ͑ʹूΊΕΔ • Clashlitics, Bugsnag
ͳͲ • ͱ͍͑ΞϓϦ͕ Crash ͠ͳ͍ͱू·Β͍ͷ͕ ։ൃऀͱͯ͠ Crash ͯ͠΄͘͠ͳ͍
iOS ͷ Framework Ͱൃੜͨ͠ NSError, NSException ͷऩू
iOS ͷ Framework Ͱൃੜͨ͠ NSError, NSException ͷऩू • Social.framework
IAP Λར༻͍ͯ͠Δ߹ɺ ଆʹ͔͠ใ͕ͳ͍ͷͰ͋Εͱͯॿ͔Δ
iOS ͷ Framework Ͱൃੜͨ͠ NSError, NSException ͷऩू • Social.framework
IAP Λར༻͍ͯ͠Δ߹ɺ ଆʹ͔͠ใ͕ͳ͍ͷͰ͋Εͱͯॿ͔Δ • Ͳͧ͜ͷ SDK ͕ Crash ͢ΔͷͰ Try-Catch ͯ͠ Crash ͠ͳ͍Α͏ʹͯ͠ใΛूΊΔ
iOS ͷ Framework Ͱൃੜͨ͠ NSError, NSException ͷऩू • Social.framework
IAP Λར༻͍ͯ͠Δ߹ɺ ଆʹ͔͠ใ͕ͳ͍ͷͰ͋Εͱͯॿ͔Δ • Ͳͧ͜ͷ SDK ͕ Crash ͢ΔͷͰ Try-Catch ͯ͠ Crash ͠ͳ͍Α͏ʹͯ͠ใΛूΊΔ • Crash Report ղੳαʔϏεͰҙͷλΠϛϯάͰϨ ϙʔτΛૹ৴Ͱ͖Δػೳ͕͋Ε؆୯ʹूΊΕΔ
iOS ͷ Framework Ͱൃੜͨ͠ NSError, NSException ͷऩू • Social.framework
IAP Λར༻͍ͯ͠Δ߹ɺ ଆʹ͔͠ใ͕ͳ͍ͷͰ͋Εͱͯॿ͔Δ • Ͳͧ͜ͷ SDK ͕ Crash ͢ΔͷͰ Try-Catch ͯ͠ Crash ͠ͳ͍Α͏ʹͯ͠ใΛूΊΔ • Crash Report ղੳαʔϏεͰҙͷλΠϛϯάͰϨ ϙʔτΛૹ৴Ͱ͖Δػೳ͕͋Ε؆୯ʹूΊΕΔ • ։ൃऀ͕໌ࣔతʹઃఆ͢ΔͷͰͲ͜ͰΤϥʔ͕ى͖ ͯΔ͔͕Ѳ͍͢͠
εΫγϣΛࡱͬͯڞ༗
εΫγϣΛࡱͬͯڞ༗ • σβΠφʔͷσβΠϯͱҧ͏
εΫγϣΛࡱͬͯڞ༗ • σβΠφʔͷσβΠϯͱҧ͏ • Ϣʔβʔ͕ҙਤͨ͠ڍಈͱζϨ͕ੜͯ͡Δ
εΫγϣΛࡱͬͯڞ༗ • σβΠφʔͷσβΠϯͱҧ͏ • Ϣʔβʔ͕ҙਤͨ͠ڍಈͱζϨ͕ੜͯ͡Δ • σʔλͷෆ߹͕ى͖ͯΔ
εΫγϣΛࡱͬͯڞ༗ • σβΠφʔͷσβΠϯͱҧ͏ • Ϣʔβʔ͕ҙਤͨ͠ڍಈͱζϨ͕ੜͯ͡Δ • σʔλͷෆ߹͕ى͖ͯΔ • Τϥʔϝοηʔδ(ίʔυ)ΛΈͤΔͨΊ
ͦͷଞ
ͦͷଞ • ࣾͰޱ಄νϟοτͰݴΘΕΔ
ͦͷଞ • ࣾͰޱ಄νϟοτͰݴΘΕΔ • Ϣʔβʔ͔Βͷ͍߹Θͤ(Helpshiftͱ͔)
ͦͷଞ • ࣾͰޱ಄νϟοτͰݴΘΕΔ • Ϣʔβʔ͔Βͷ͍߹Θͤ(Helpshiftͱ͔) • AppStore ͷϨϏϡʔ
ͦͷଞ • ࣾͰޱ಄νϟοτͰݴΘΕΔ • Ϣʔβʔ͔Βͷ͍߹Θͤ(Helpshiftͱ͔) • AppStore ͷϨϏϡʔ • SNS
ͰΤΰαʔν
ݱঢ়͜Μͳײ͔͡ͳͱ
ͯ͞ɺ͔͜͜Β͕ຊͰ͢
͋ͳͨ Twitter ࣾͰ ΞϓϦΛ࡞͍ͯ͠·͢
◦◦͕όάͬͯΜ͚ͩͲͬͯ ͜ΜͳεΫγϣΛૹΒΕ͖ͯ·ͨ͠
͜Ε͔Βਪଌ͠ͳ͍ͱ͍͚ͳ͍
͜Ε͔Βਪଌ͠ͳ͍ͱ͍͚ͳ͍ • ͓·͑ɺͩΕʁ (Identifier తͳҙຯͰ)
͜Ε͔Βਪଌ͠ͳ͍ͱ͍͚ͳ͍ • ͓·͑ɺͩΕʁ (Identifier తͳҙຯͰ) • API ଆ͕ݪҼʁ ͦΕͱΞϓϦଆʁ
͜Ε͔Βਪଌ͠ͳ͍ͱ͍͚ͳ͍ • ͓·͑ɺͩΕʁ (Identifier తͳҙຯͰ) • API ଆ͕ݪҼʁ ͦΕͱΞϓϦଆʁ •
͍·Έ͑ͯΔ Cell Λߏஙͯ͠ Δσʔλ͕Έ͍ͨ
͜Ε͔Βਪଌ͠ͳ͍ͱ͍͚ͳ͍ • ͓·͑ɺͩΕʁ (Identifier తͳҙຯͰ) • API ଆ͕ݪҼʁ ͦΕͱΞϓϦଆʁ •
͍·Έ͑ͯΔ Cell Λߏஙͯ͠ Δσʔλ͕Έ͍ͨ • ͜Ε࠶ݱͰ͖Δ͔ͳ…
ਪଌͯ͠ใΛूΊͳ͍ͱ͍͚ͳ͍
ͭΒ͍…
ͦͦϢʔβʔͷͨΊʹ ද͍ࣔͯ͠Δը໘ͳΜ͔ͩΒ σόοάʹඞཁͳใ΄΅ͳ͍
σόοάͷαΠΫϧ 1. όάͷݪҼਪଌ 2. όάͷ࠶ݱ 3. debug…debug…debug!!!
σόοάͷαΠΫϧ 1. όάͷݪҼਪଌ͢ΔͨΊͷใΛը૾ ͔ΒಡऔΔ 2. όάͷݪҼਪଌ 3. όάͷ࠶ݱ 4. debug…debug…debug!!!
εΫγϣ͔ΒۭؾΛಡΜͰ Կσόοά͢Δ͕ ຊʹΊΜͲ͏͍͘͞ʂʂʂʂ
print debug break point Λ ͑ΔͳΒ؆୯ʹ ใΛूΊΕΔͷʹ…
ʂʂʂʂʂʂʂʂʂʂʂʂʂʂʂ
ͦΕͳΒεΫγϣΛࡱͬͨ࣌ʹ σόοάʹඞཁͳใΛ Ұॹʹը૾ͱͯ͠ग़ྗ͢Ε͍͍ʂ
! DFTDebugScreenshot http://github.com/dealforest/DFTDebugScreenshot
Install pod ‘DFTDebugScreenshot’
Usage
DEMO
Ԡ༻
Ԡ༻ • AutoLayout Ͱ UIView ʹઃఆ͍ͯ͠Δ Constraints Λ ग़ྗ͢Δ͜ͱͰ͖Δ
Ԡ༻ • AutoLayout Ͱ UIView ʹઃఆ͍ͯ͠Δ Constraints Λ ग़ྗ͢Δ͜ͱͰ͖Δ •
UIWebView Ͱ࡞͍ͬͯΔΞϓϦͰɺjs ͷใ(ม , ϒϥβͷใ)Λग़ྗ͢Δ͜ͱͰ͖Δ
Ԡ༻ • AutoLayout Ͱ UIView ʹઃఆ͍ͯ͠Δ Constraints Λ ग़ྗ͢Δ͜ͱͰ͖Δ •
UIWebView Ͱ࡞͍ͬͯΔΞϓϦͰɺjs ͷใ(ม , ϒϥβͷใ)Λग़ྗ͢Δ͜ͱͰ͖Δ • completionBlock ΛࠐΜͰ͓͘ͱεΫγϣΛࡱΔͱ εΫγϣͱσόοΫใΛ Slack S3 ϝʔϧͰ ࣗಈతʹૹ৴͜ͱͰ͖Δ
Ԡ༻ • AutoLayout Ͱ UIView ʹઃఆ͍ͯ͠Δ Constraints Λ ग़ྗ͢Δ͜ͱͰ͖Δ •
UIWebView Ͱ࡞͍ͬͯΔΞϓϦͰɺjs ͷใ(ม , ϒϥβͷใ)Λग़ྗ͢Δ͜ͱͰ͖Δ • completionBlock ΛࠐΜͰ͓͘ͱεΫγϣΛࡱΔͱ εΫγϣͱσόοΫใΛ Slack S3 ϝʔϧͰ ࣗಈతʹૹ৴͜ͱͰ͖Δ • ಛఆͷϢʔβʔ͚ͩσόοάใΛग़ྗ͢Δ͜ͱ Մೳ
TODO
TODO • ݱࡏදࣔ͞Ε͍ͯΔ UIViewController ͷ debugObject Λ͍ͭͰऔಘͰ͖ΔΑ͏ͳ interface ΛՃ͢ΔͭΓ
TODO • ݱࡏදࣔ͞Ε͍ͯΔ UIViewController ͷ debugObject Λ͍ͭͰऔಘͰ͖ΔΑ͏ͳ interface ΛՃ͢ΔͭΓ •
dealforest/DFTAwesomePrint Λ࡞͍ͬͯͯ debugObject Λ colorize ͯ͠ը૾ʹ͢ΔͭΓ
TODO • ݱࡏදࣔ͞Ε͍ͯΔ UIViewController ͷ debugObject Λ͍ͭͰऔಘͰ͖ΔΑ͏ͳ interface ΛՃ͢ΔͭΓ •
dealforest/DFTAwesomePrint Λ࡞͍ͬͯͯ debugObject Λ colorize ͯ͠ը૾ʹ͢ΔͭΓ • AccessToken cookie Λग़ྗͨ࣌͠ͷͨΊʹ҉߸Խ ͍ͨ͠(QRίʔυͱ͔ʁ)
TODO • ݱࡏදࣔ͞Ε͍ͯΔ UIViewController ͷ debugObject Λ͍ͭͰऔಘͰ͖ΔΑ͏ͳ interface ΛՃ͢ΔͭΓ •
dealforest/DFTAwesomePrint Λ࡞͍ͬͯͯ debugObject Λ colorize ͯ͠ը૾ʹ͢ΔͭΓ • AccessToken cookie Λग़ྗͨ࣌͠ͷͨΊʹ҉߸Խ ͍ͨ͠(QRίʔυͱ͔ʁ) • σόοΫ༻ը૾ͷσβΠϯ୭͔͍͍ײ͡ʹͯ͠w
·ͱΊ εΫγϣ͔Βσόοάʹ ඞཁͳใΛਪଌͤͣʹ ͙͢ʹݪҼಛఆʹͱΓ͔͔ΕΔ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠