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
570
つまづいた時のデバッグ術 / yumemi-swift-how-to-debug
IshibaSeiko
May 15, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
CursorはMCPを使った方が良いぞ
taigakono
1
200
童醫院敏捷轉型的實踐經驗
cclai999
0
210
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
530
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
160
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
330
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
880
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
0
250
技術同人誌をMCP Serverにしてみた
74th
1
450
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
830
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.8k
Featured
See All Featured
Docker and Python
trallard
44
3.4k
Speed Design
sergeychernyshev
32
1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Balancing Empowerment & Direction
lara
1
390
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Six Lessons from altMBA
skipperchong
28
3.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
720
Become a Pro
speakerdeck
PRO
28
5.4k
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Λλοϓ͢Δ