mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add basic documentation for debugging react native apps
This commit is contained in:
19
docs/Debugging.md
Normal file
19
docs/Debugging.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
id: debugging
|
||||
title: Debugging
|
||||
layout: docs
|
||||
category: Guides
|
||||
permalink: docs/debugging.html
|
||||
next: testing
|
||||
---
|
||||
|
||||
## Debugging React Native Apps
|
||||
To debug the javascript code of your react app do the following:
|
||||
|
||||
1. Run your application in the iOS simulator.
|
||||
2. Press ```Command + D``` and a webpage should open up at [http://localhost:8081/debugger-ui](http://localhost:8081/debugger-ui). (Chrome only for now)
|
||||
3. Press ```Command + Option + I``` to open the Chrome Developer tools, or open it via ```View``` -> ```Developer``` -> ```Developer Tools```.
|
||||
4. You should now be able to debug as you normally would.
|
||||
|
||||
### Optional
|
||||
Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) extension for Google Chrome. This will allow you to navigate the view hierarchy if you select the ```React``` tab when the developer tools are open.
|
||||
@@ -4,7 +4,7 @@ title: Native Modules (iOS)
|
||||
layout: docs
|
||||
category: Guides
|
||||
permalink: docs/nativemodulesios.html
|
||||
next: testing
|
||||
next: debugging
|
||||
---
|
||||
|
||||
Sometimes an app needs access to platform API, and React Native doesn't have a corresponding wrapper yet. Maybe you want to reuse some existing Objective-C or C++ code without having to reimplement it in JavaScript. Or write some high performance, multi-threaded code such as image processing, network stack, database or rendering.
|
||||
|
||||
Reference in New Issue
Block a user