ããã«ã¡ã¯ãã¢ãã¤ã«éçºãã¼ã ã«æå±ãã¦ããå°å³¶ã§ãã
ãã£ãã«ã¯ããã¾ãããããã¾ã«OSã®ã¤ãã³ãããã¢ããªãèµ·åãããã¨ãã®ãããã°ãè¡ããããã¨ãããã¾ãã
ä¾ãã°ãããã·ã¥ãåããæãããã£ã¼ããªã³ã¯ã§èµ·åããã¨ãã® application:didFinishLaunchingWithOptions:
ã Application#onCreate
ã®æåãªã©ã§ãã
iOS ã®å ´å
Xcode ã®ã¡ãã¥ã¼ãã ãDebug > Attach to Process > By Process Identifier (PID) or Nameããé¸æãã¾ãã
ãPID or Process Nameã ã®é¨åã«éçºä¸ã®ã¢ããªå(ããã»ã¹å)ãæå®ãã¦ããAttachããã¿ã³ãæ¼ãã¾ãã
ããããã¨ãXcode ã¯ãã¢ããªãæªèµ·åã®å ´åã¯ããã»ã¹ãèµ·åããã¾ã§ã¢ã¿ãããå¾
æ©ãã¦ããã¾ãã
ãªã®ã§ãããã·ã¥éç¥ãªã©ããã¢ããªãç«ã¡ä¸ãã£ãã¨ãã«ãå³æã«ã¢ã¿ããããèµ·åç´å¾ã®å¦çã®ãããã°ãå¯è½ã«ãªãã¾ãã
Android ã®å ´å
Android ã®å ´åã¯ããã¬ã¼ã¯ãã¤ã³ãã®æå㧠Debug#waitForDebugger()
ãä»è¾¼ãã§ããã¾ããããã«ãããã¢ããªã¯ãããã¬ãã¢ã¿ãããããã¾ã§å¾
æ©ããããã«ãªãã¾ãã
ãªã®ã§ãããã·ã¥éç¥ãªã©ã§ã¢ããªãèµ·åå¾ãåæ¢ãã¦ããæä¸ã« Android Studio ã®ã¡ãã¥ã¼ã® ãRun > Attach debugger to Android processããå®è¡ãã¦ããã»ã¹ã«ã¢ã¿ããããã°ãã¢ããªãåã³åãåºããããã°å¯è½ãªç¶æ
ã«ãªãã¾ãã
ã¾ã¨ã
- iOS ã®å ´åã¯ãXcode ã§å ã«ã¢ã¿ãããæºåãããã»ã¹ãèµ·åããã¾ã§å¾ æ©ã
- Android ã®å ´åã¯ãã¢ããªãå ã«ã¢ã¿ãããããã®ãå¾ æ©ã Android Studio ãã¢ã¿ããããã
é çªãç°ãªãã¾ããã両 OS ã¨ãã«ããã·ã¥éç¥ãªã©ããèµ·åããã¨ãã®å¦çã®ãããã°ãå¯è½ã§ãã
ãã¾ãå¿
è¦ã¨ãªãæ©ä¼ã¯ç¡ãã¨æãã¾ãããæè¿å¿
è¦ã«ãªã£ã¦èª¿ã¹ã¦ã¿ãã®ã§ã©ãªããã®ãå½¹ã«ç«ã¦ãã°å¹¸ãã§ãã