From 9ffb2b27e81f588e14e4a1c31b0daab4dbad598a Mon Sep 17 00:00:00 2001 From: Andrew <35735666+meatnordrink@users.noreply.github.com> Date: Mon, 18 Jul 2022 06:41:49 -0400 Subject: [PATCH 1/4] Note on connecting to React Native simulator. --- docs/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/debugging.md b/docs/debugging.md index 20583c7ee4e..c0c3d16f200 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -115,7 +115,7 @@ react-devtools ![React DevTools](/docs/assets/ReactDevTools.png) -It should connect to your simulator within a few seconds. +It should connect to your simulator within a few seconds. If it doesn't, try running `adb reverse tcp:8097 tcp:8097` in a new terminal. > Note: if you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools. From dd09565261ba44512b5c7b591af8d066bb0b426f Mon Sep 17 00:00:00 2001 From: Andrew <35735666+meatnordrink@users.noreply.github.com> Date: Thu, 21 Jul 2022 11:41:50 -0400 Subject: [PATCH 2/4] Editing based on CR suggestion --- docs/debugging.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/debugging.md b/docs/debugging.md index c0c3d16f200..8847263ba1c 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -115,7 +115,9 @@ react-devtools ![React DevTools](/docs/assets/ReactDevTools.png) -It should connect to your simulator within a few seconds. If it doesn't, try running `adb reverse tcp:8097 tcp:8097` in a new terminal. +It should connect to your simulator within a few seconds. + +> Note: If you have trouble connecting to your simulator, especially if using an Android 12 simulator, try running `adb reverse tcp:8097 tcp:8097` in a new terminal. > Note: if you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools. From 9c56771b6e0d47a0d507979a6aa31fa8595438d2 Mon Sep 17 00:00:00 2001 From: Andrew <35735666+meatnordrink@users.noreply.github.com> Date: Thu, 21 Jul 2022 14:51:34 -0400 Subject: [PATCH 3/4] Accept CR suggested edit Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com> --- docs/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/debugging.md b/docs/debugging.md index 8847263ba1c..76782c83b3a 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -117,7 +117,7 @@ react-devtools It should connect to your simulator within a few seconds. -> Note: If you have trouble connecting to your simulator, especially if using an Android 12 simulator, try running `adb reverse tcp:8097 tcp:8097` in a new terminal. +> Note: If connecting to the emulator proves troublesome (especially Android 12), try running `adb reverse tcp:8097 tcp:8097` in a new terminal. > Note: if you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools. From c845c168fc18db847209882c5729fcbd37416e01 Mon Sep 17 00:00:00 2001 From: Andrew <35735666+meatnordrink@users.noreply.github.com> Date: Tue, 26 Jul 2022 06:53:09 -0400 Subject: [PATCH 4/4] Accepting suggested edit from CR Co-authored-by: Nicola Corti --- docs/debugging.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/debugging.md b/docs/debugging.md index 76782c83b3a..0e2639dd57c 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -117,9 +117,13 @@ react-devtools It should connect to your simulator within a few seconds. -> Note: If connecting to the emulator proves troublesome (especially Android 12), try running `adb reverse tcp:8097 tcp:8097` in a new terminal. +:::info +If connecting to the emulator proves troublesome (especially Android 12), try running `adb reverse tcp:8097 tcp:8097` in a new terminal. +::: -> Note: if you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools. +:::info +If you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools. +::: ### Integration with React Native Inspector