iOSDC Japan 2016 åå ã¡ã¢: A-11 Xcodeã§å¿«é©ãªãããã°ã©ã¤ãã追ãæ±ãã
-
森æ¬ãã @dealforest ããªã¼ã©ã³ã¹
-
Xcode Plugin
- Xcode 8 ãã Xcod Pluginãåããªããªã£ãããã
Xcode
ã¯ã©ãã·ã¥ãããAppDelegateã ã£ãåé¡
- ãããã¯ã¢ã»ã³ãã©ã ã£ãåé¡
Exception Breakpointã追å
-
Breakpoint追å æã«
Exception Breakpoint
ãé¸ãã§è¿½å- ãã ããExceptionåæã§æ¸ããã¦ããã¨æå³ã¨éãã¿ã¤ãã³ã°ã§breakãã¦ãã¾ã
- storyboardããªããã°ãã©ã¼ã«ããã¯ãããã¨ã
- ãã ããExceptionåæã§æ¸ããã¦ããã¨æå³ã¨éãã¿ã¤ãã³ã°ã§breakãã¦ãã¾ã
Diagonosticsãè¨å®
- ä¸æ£ãªã¡ã¢ãªæä½ãæ¤ç¥
- dynamic library
- Edit Schemaããè¨å®ã§ãã
- Enable Zombi Object
- Enable Address Sanitizor -> ããã©ã¼ãã³ã¹ã¯ä¸ãã
- ã¢ã»ã³ãã©ã¬ãã«ã¾ã§ã¯ã©ãã·ã¥ããå ´åããããããã°è¿½ãã
ã©ã®ViewControllerãããããªãåé¡
æ°ããããã¸ã§ã¯ãã«å ¥ãã¨ããã
Symblic Breakpointã追å
- Symbolã«viewWillAppear / viewDidLoadãªã©ã追å
- commandã§
bt 0
ããã¨ã§ã
- commandã§
- viewControllerã§è¨å®ãã¦ãããªãã¨ãSymbolic Breakpointãå¹ããªã
- Symbolã«viewWillAppear / viewDidLoadãªã©ã追å
Share Breakpointããã¨ããã¼ã éã§å ±æã§ãã
èµ·åæã«ç¹å®ã®ViewControllerã«ãããåé¡
- ãããã°æã«æ·±ããã¼ã¸éãã®è¾ãããã
- Environment Variables
- Edit Schemaããè¨å®ã§ãã
- ãã®ç°å¢å¤æ°ãåç §ãã¦æåãå¤ããå¦çãAppDelegateã«æ¸ãã¦ãã
- ã¡ãªãã
- Xcode ããèµ·åããæã®ã¿æå¹ã«ãªãï¼
- ä¸æçãªæåã®åæ¿ã«ä¾¿å©
- Edit Schemaããè¨å®ã§ãã
端æ«ã®ãã°ããã¡ã¤ã«ãåå¾ãããåé¡
å®æ©ã®ãã°ãRealmãã¿ãã
- ã§ãããã©ããã©ããã
LLDBã使ã£ã¦è©²å½ãã¡ã¤ã«ãSlackã«éä¿¡
- breakpointã§breakãã¦ã³ãã³ããæã¤
- gistã«å
¬éãã¾ãã
./llidbinit
ã®ä¸ã«å¼ã³åºããå ¥ãã¦ãã
ã¾ã¨ã
- å¿«é©ã«ãªãã¨è¯ããï¼
QA
Closureã®ä¸ã§ãªãã¸ã§ã¯ããåç §ããæ¹æ³ã¨ãããã¾ããï¼
- lldbãå·§ããã¬ã¼ã ãåãã¦ãªãã®ãæªãã
- 2é£çºã§åãã¨å·§ãè¡ããã¨ã¯ããããããã©åºæ¬è«¦ãã¦ã
Breakpointã¨logãå¤ããã¦ããããªããªãã®ã¯ã©ããã¦ã¾ããï¼
- Loglevelãåãæ¿ããããããã«ããããã¦ããã£ã«ã¿ãã¦ã