SIGN IN SIGN UP

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools

0 0 0 JavaScript
# React DevTools Integration
**_NOTE_** Supported React Native version is `>= 0.43`. Please downgrade RNDebugger version to `0.7.21` if you're using older versions of React Native.
The React DevTools is built by [`react-devtools-core/standalone`](https://github.com/facebook/react-devtools/tree/master/packages/react-devtools-core#requirereact-devtools-corestandalone), this is same with element inspector of [`Nuclide`](https://nuclide.io/docs/platforms/react-native/#debugging__element-inspector).
It will open a WebSocket server to waiting React Native connection. The connection already included in React Native (see [`setupDevtools.js`](https://github.com/facebook/react-native/blob/master/Libraries/Core/Devtools/setupDevtools.js)), it will keep trying to connect the React DevTools server in development mode, it should works well without specify anything, unless you need to set the server hostname for [use it with real device](#how-to-use-it-with-real-device).
We made the server listen a random port and inject `window.__REACT_DEVTOOLS_PORT__` global variable in debugger worker.
For Android, we have the built-in `adb` util and it will reverse the port automatically.
## Specified features for React Native
#### React Native Style Editor
- Native styler
- Layout inspect
2017-05-27 13:07:35 +08:00
<img width="288" alt="2017-05-27 12 00 36" src="https://cloud.githubusercontent.com/assets/3001525/26518163/0dc24ea6-42dd-11e7-91aa-52da5c4d347d.png">
#### Show component source in editor
It's support Atom, Subline, VSCode for macOS.
<img width="276" alt="tt" src="https://cloud.githubusercontent.com/assets/3001525/25572822/a83fdafa-2e71-11e7-8093-cce3f7db98c0.png">
## Inspect elements
You can read the section [`Integration with React Native Inspector`](https://github.com/facebook/react-devtools/tree/master/packages/react-devtools#integration-with-react-native-inspector) from README of `react-devtools`, we have the same usage with the package.
## Change theme of Chrome DevTools with React DevTools together
You can change Chrome DevTools theme (Default / Dark), the theme of React DevTools will be changed together if you have no selected another theme for React DevTools:
2017-08-23 12:38:27 +08:00
![2017-08-23 13_20_17](https://user-images.githubusercontent.com/3001525/29600011-f0782798-8798-11e7-88cf-98f50e24199d.gif)
2017-08-23 12:38:27 +08:00
The `RNDebugger DevTools` option is by default to match Chrome DevTools.
**_NOTE_** Currently Chrome DevTools (Electron) doesn't reload automatically, we need to `Toggle Developer Tools` twice (Application menu or `⌥+⌘+I` (`Ctrl+Alt+I`)), subscribe [#87](https://github.com/jhen0409/react-native-debugger/issues/87) for tracking the issue.
## How to use it with real device?
- Starting from RN `0.53.0-rc`, it should work by default.
- If you're debugging via Wi-Fi, you need to edit `setupDevtools.js` of React Native manually, change `'localhost'` to your machine IP.
- `>= 0.43` - The same as above, but use `host` property of `connectToDevTools` instead.
## Get `$r` global variable of React Native runtime in the console
Refer to [`Debugger Integration`](debugger-integration.md#debugging-tips).
2017-09-13 03:33:46 +08:00
## Other documentations
- [Getting Started](getting-started.md)
- [Debugger Integration](debugger-integration.md)
- [Redux DevTools Integration](redux-devtools-integration.md)
- [Apollo Client DevTools Integration](apollo-client-devtools-integration.md)
- [Shortcut references](shortcut-references.md)
- [Network inspect of Chrome Developer Tools](network-inspect-of-chrome-devtools.md)
- [Enable open in editor in console](enable-open-in-editor-in-console.md)
v0.8.0 (#266) * Implement root config file in home directory (#165) * Add handle for read root config * Add openConfigFile method use for application menu * Add `Open config file` appliciation menu item * Comment window size in config template * Apply windowBounds, autoUpdate config * Apply defaultRNPakcagerPorts, defaultNetworkInspect config * Apply editor, defaultReactDevToolsTheme config * Use zoomLevel instead of fontSize * Add comment for defaultNetworkInspect config * Update test snapshot * Don't set EDITOR env if no config.editor * Show error message if config parse failed * Apply fontFamily, showAllDevToolsTab config * Update config template * Add documentation for config file * Comment fontFamily in config template * fix typos (#182) * Changed the type you're to you've (#185) * Remove Code Sponsor link * Add Open Collective links * Fix badges separation in README * Update docs/react-devtools-integration.md * Improve English (#193) The previous message was not grammatically correct. * Added support rndebugger-open for RN >= 0.53.0 (#198) * [NPM package] v0.3.16 * Update travis script * Update to node 9 on travis * Revert "Update travis script" This reverts commit 7593608966c643faedebe0595a70f6920963f88a. * Fix` rndebugger-open` injection with RN >= 0.53 again (#202) * Fix rndebugger-open inject with RN >= 0.53 again * Update snapshots * [NPM package] v0.3.17 * Fixed typo (#204) * fix grammatical improvements / add clarity to the network inspect docs. (#207) Also fixed a broken internal link to these docs from debugger integration * Add Delta patcher from react-native * Check Delta support on executeApplicationScript * Clear logs when check Delta support finished * Update check Delta support * E2E Test: Support file:// for fetch only on test * E2E test: Update expected logs * Update deltaUrlToBlobUrl.js from upstream * Add Open Collective link in Help * Update dependencies * v0.7.14 * Fix prod bundle by downgrade uglifyjs-webpack-plugin * v0.7.15 * Fix auto_updater.json * Check if Delta Bundler available (#215) * Check if Delta bundler available * Update E2E test * Clear logs even if no error catched * Fix Blob error for use `fetch` if Network Inspect enabled (#217) * Patch fetch code on applyDelta * Disable `support.blob` in `whatwg-fetch` for use native XMLHttpRequest * Don't check fetch code if it already patched * Check only if map type is delta * Update regex pattern * v0.7.16 * Send `callFunctionReturnFlushedQueue` event after waiting application script executed (#219) * Send `callFunctionReturnFlushedQueue` event after waiting application script executed * Fix lint error * Check scriptExecuted first * Toggle network inspect after define `support` var on patchFetchPolyfill (#220) * v0.7.17 * [update] Improve dialog wording slightly. (#221) * Ensure the initial script of `whatwg-fetch` is executed related to #209 * Patch all `whatwg-fetch` packages related to #209 * v0.7.18 * Fix error of blob function not found in whatwg-fetch with Network Inspect enabled * Fix typos (#238) * Update debugger from upstream (#240) * Update debugger from upstream https://github.com/facebook/react-native/commit/e5aa5b7c508c5e0e51f7abfcee350e27bef24ba2 * Upgrade Expo / RN versions in examples * Fix lint error * Fix worker didnt post message if checkDeltaAvailable failed * Remove unnecessary waitingScriptExecuted * set global.Blob to global.originalBlob before deleting global.Blob for rn > 0.54 compatability (#246) * Fix context menu functions for RN 0.56 (#247) * Fix patchFetchPolyfill for compatible RN 0.56 * Fix required modules of RNDebugger functions on RN 0.56 * Update docs/network-inspect-of-chrome-devtools.md * Update docs/debugger-integration.md * Update test fixture * Add more comments about Network Inspect manually setup * Lookup for react-native implementation * Assign global.$reactNative for make debug easier * Detect metroRequire for RN 0.56 * Update docs/debugger-integration.md * Bump electron version to 1.7.15 * Add the recently changes from redux-devtools-extension (#248) * Bump redux-devtools-instrument to v1.9 * Add actionCreators option for connect API * Update dependencies also downgrade redux to v3.7.2 because remotedev-app still using * Fix lint errors * v0.7.19 * Fix buildTestBundle of E2E tests * Fix ref issue of Draggable related to #250 * v0.7.20 * Update auto_updater.json * Fixes typo (#258) * update react-devtools-core for supporting react-profiler (#262) * Fix context menu functions on RN 0.57 (#263) * Use __r from RN >= 0.57 as metro require in debugger worker * Fix patchFetchPolyfill for RN 0.57 * Update docs/react-devtools-integration.md * v0.8.0
2018-09-29 18:32:42 +08:00
- [Config file in home directory](config-file-in-home-directory.md)
- [Troubleshooting](troubleshooting.md)
- [Contributing](contributing.md)