LoginSignup
42
36

More than 5 years have passed since last update.

React Nativeのデバッグ方法

Last updated at Posted at 2015-03-27

ドキュメントを探しても見つからず、ググったらStack OverFlowにありました。
http://stackoverflow.com/questions/29289304/how-do-you-debug-react-native

Cmd+D from within the Simulator. It'll popup Chrome and from there you can use the Developer Tools.

こんなのどこに書いてあるんでしょうね。

ということでシミュレーター上でCmd+Dを叩いてみます。
スクリーンショット 2015-03-28 1.32.43.png

すると、chromeでこんな画面が立ち上がります。
スクリーンショット 2015-03-28 1.28.52.png

メッセージの通りChromeのDeveloper Toolsを起動します。
index.ios.jsというファイルを開くとソースの中身が見れます。
スクリーンショット 2015-03-28 1.30.13.png

任意の場所にブレークポイントを置いてアプリをCmd+Rでリロードしてみると、ちゃんとブレークポイントの位置で止まりました。右側に変数の値も出てます。
スクリーンショット 2015-03-28 1.30.59.png

アプリのデバッグをChrome Developer Toolsから行うというのがなんともユニークですね。

42
36
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
42
36