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
つまづいた時のデバッグ術 / yumemi-swift-how-to-debug
Search
IshibaSeiko
May 15, 2020
Programming
1
500
つまづいた時のデバッグ術 / yumemi-swift-how-to-debug
IshibaSeiko
May 15, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
甘い香りに誘われてVanilla Extractを1年間運用してみた
miyahkun
1
110
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.6k
pixivアプリでマルチモジュールを実現するまで
gatosyocora
1
130
Ruby Pattern Matching
bkuhlmann
0
920
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
25
7.8k
Java 22 Overview
kishida
1
170
データアナリストが行うDatabricksを活用したETLの自動化事例
shinoa
0
250
Site Reliability Engineering for GMO
pyama86
6
930
1인 개발자로 행복하게 살기 - GDG 송도 헬로월드 2024
benjaminkim
1
5.6k
Folding Cheat Sheet #2
philipschwarz
PRO
0
110
Javaエンジニアのための Nodejs/Nuxt3入門
hidekatsu_izuno
0
280
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
19
1.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
GraphQLとの向き合い方2022年版
quramy
31
12k
Practical Orchestrator
shlominoach
181
9.7k
The Brand Is Dead. Long Live the Brand.
mthomps
48
28k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Visualization
eitanlees
135
14k
Thoughts on Productivity
jonyablonski
57
3.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.4k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
Transcript
ͭ·͍ͮͨ࣌ͷσόοάज़ w ࣗݾհ w എܠͱత w σόοάज़ w QSJOUPCKFDU w
#SFBLQPJOU "DUJPO w &YDFQUJPO#SFBLQPJOU w 7JFX%FCVH
2 ੴਗ਼ࢠ ͍͍ͤ͜͠ w J04ΤϯδχΞ w ࣮ܦݧ ݄d w
Swiftେ͖ w (JUIVC • https://github.com/IshibaSeiko w 2JJUB • https://qiita.com/seikoseikou w 5XJUUFS • @seikoseikou w #MPH • https://seikoseikou.com
3 എܠͱత wϓϩάϥϛϯά΄΅ະܦݧͰೖࣾͨͨ͠Ίɺ ʮσόοάʯΛΒͳ͔ͬͨ wϏϧυͨ͠Βɺࢥ͍ඳ͍͍ͯͨڍಈʹͳΒͳ͔ͬͨʂ wόάௐࠪΛ͞Εͨʂ w ͰɺݪҼͷௐํ͕Θ͔Βͳ͍ ϧʔΩʔୡʹɺσόοάज़Λڭ͍͑ͨʂ
4 αϯϓϧΞϓϦʹ͍ͭͯ ιʔείʔυ https://github.com/IshibaSeiko/DebugDemo ػೳ ϘλϯΛλοϓ͢Δͱɺ ৭ͷViewͱ੨৭ͷViewͷલޙ͕ΓସΘΔ ॲཧ @IBAction func
didTapSwapButton(_ sender: UIButton) { view.bringSubviewToFront(view.subviews[1]) }
5 ࠓհ͢Δσόοάज़ • print object w Λ֬ೝ͍ͨ͠ • Breakpoint +
Action w ॲཧΛ௨ΔͨͼʹΛ֬ೝ͍ͨ͠ • Exception Breakpoint w ΞϓϦΫϥογϡͷݪҼ͕Γ͍ͨ • View Debug w UI্ͷΛΓ͍ͨ
6 σόοάज़print object import UIKit class ViewController: UIViewController { override
func viewDidLoad() { super.viewDidLoad() } @IBAction func didTapSwapButton(_ sender: UIButton) { view.bringSubviewToFront(view.subviews[1]) } } ϚδοΫφϯόʔ͔ͩΒɺ ͲͷView͕औಘ͞ΕΔ͔Θ͔Βͳ͍
7 Α͋͘ΔΓํ @IBAction func viewSwapButton(_ sender: UIButton) { view.bringSubviewToFront(view.subviews[1])
print(view.subviews[1]) } • ֬ೝ͢ΔͨΊʹBuild͢Δඞཁ͕͋Δ • ػೳͱͯ͠ෆཁͳίʔυΛهड़͢Δ͜ͱͱͳΔ
8 σόοάज़print object ίϯιʔϧͰΛ֬ೝ͢Δ
9 σόοάज़print object ৭ͷView͕औಘ͞Εͨ Ͱɺຖճpo͢Δͷɺ໘ʜ ϚδοΫφϯόʔ͔ͩΒɺ ͲͷView͕औಘ͞ΕΔ͔Θ͔Βͳ͍
10 σόοάज़Breakpoint + Action BreakpointʹActionΛՃ͠ɺϩάΛදࣔ͢Δ
11 σόοάज़Breakpoint + Action Ͱɺຖճ֬ೝ͢Δͷɺ໘ʜ ࣗಈͰϩά͕දࣔ͞ΕΔΑ͏ʹͳͬͨ ࣍όάΛൃੜͯ͠ΈΑ͏
12 σόοάज़Exception Breakpoint ࣄ ϘλϯΛλοϓ͢Δͱɺ ΞϓϦ͕Ϋϥογϡ͢Δ ݪҼʜ
13 σόοάज़Exception Breakpoint AppDelegateͰΫϥογϡ͢Δͭ
14 σόοάज़Exception Breakpoint ྫ֎͕ൃੜͨ͠ՕॴͰϒϨʔΫ͢Δ
15 σόοάज़Exception Breakpoint ϘλϯΛλοϓ͢Δͱɺ ΞϓϦ͕Ϋϥογϡ͢Δ ྻʹଘࡏ͠ͳ͍σʔλΛऔಘ͠Α͏ͱ͍ͯͨ͠ ࣍όάΛൃੜͤͯ͞ΈΔ
16 σόοάज़View Debug ࣄ ϘλϯΛλοϓͰ͖ͳ͍ ݪҼʜ
17 σόοάज़View Debug Viewͷ֊Λ֬ೝ͢Δ
18 σόοάज़View Debug SwapϘλϯΑΓલ໘ʹɺ User Interaction Enabled͕Onʹͳ͍ͬͯΔView͕ ॏͳ͍ͬͯͨ ϘλϯΛλοϓͰ͖ͳ͍
19 ·ͱΊ • print object w ίϯιʔϧͰApo{֬ೝ͍ͨ͠ίʔυ}AΛೖྗ͢Δ • Breakpoint +
Action w ઃఆͨ͠BreakpointΛμϒϧλοϓͯ͠actionΛՃ͢Δ • Exception Breakpoint w Breakpoint NavigatorࠨԼͷʮ ʯ͔Β Exception BreakpointΛՃ͢Δ • View Debug w Debug View HierarchyΛλοϓ͢Δ