Skip to content

Conversation

byCedric
Copy link
Member

@byCedric byCedric commented Nov 30, 2023

Why

Follow-up of #25649

How

This PR changes two things

  1. When pressing j in terminal, allow users to select a device using a select UI. This is copied from the multiple dev tools, and uses the (known) device name. This replaces the "open all app debuggers" to confuse users less.
  2. When using EXPO_USE_UNSTABLE_DEBUGGER=true, the React Native JS Inspector is used instead of the "classic" Chrome DevTools from SDK <=49.

It also cleans up the older middleware that handled /inspector. This is now handled by the CDP-spec-compliant /json/list. We could also move everything under _expo/inspector/... if this is a problem.

Test Plan

  • $ bun create expo ./test-debugger --template blank
  • $ bun expo install expo@canary
  • $ bun expo install --fix
  • $ bun expo run:ios
    • Or $ EXPO_USE_UNSTABLE_DEBUGGER=true bun expo run:ios

Checklist

@byCedric byCedric requested a review from EvanBacon as a code owner November 30, 2023 16:55
@byCedric byCedric changed the title @bycedric/cli/open experimental debugger feature(cli): add EXPO_EXPERIMENTAL_DEBUGGER to enable the new React Native JS Inspector Nov 30, 2023
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Nov 30, 2023
@byCedric byCedric changed the title feature(cli): add EXPO_EXPERIMENTAL_DEBUGGER to enable the new React Native JS Inspector feature(cli): add EXPO_USE_UNSTABLE_DEBUGGER to enable the new React Native JS Inspector Nov 30, 2023
@byCedric byCedric force-pushed the @bycedric/cli/fix-dev-middleware branch from 1ea6862 to 3312f06 Compare December 1, 2023 12:15
Base automatically changed from @bycedric/cli/fix-dev-middleware to main December 1, 2023 16:55
@byCedric byCedric force-pushed the @bycedric/cli/open-experimental-debugger branch from 2f87890 to 1b77fa2 Compare December 1, 2023 16:59
@byCedric byCedric requested a review from EvanBacon December 1, 2023 17:01
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Dec 1, 2023
@byCedric byCedric requested a review from Simek as a code owner December 2, 2023 13:29
@byCedric byCedric merged commit d416973 into main Dec 4, 2023
@byCedric byCedric deleted the @bycedric/cli/open-experimental-debugger branch December 4, 2023 12:54
byCedric added a commit that referenced this pull request Dec 12, 2023
…devices (#25879)

# Why

Correction of #25671

# How

- Use `app.deviceName` instead of `app.title`

# Test Plan


![image](https://github.com/expo/expo/assets/1203991/740ab535-3274-43fe-bd23-69fd0c725179)

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
byCedric added a commit that referenced this pull request Dec 12, 2023
…devices (#25879)

# Why

Correction of #25671

# How

- Use `app.deviceName` instead of `app.title`

# Test Plan


![image](https://github.com/expo/expo/assets/1203991/740ab535-3274-43fe-bd23-69fd0c725179)

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
byCedric added a commit that referenced this pull request Dec 12, 2023
# Why

Stacked on top of #25881
Correction of #25671

This was in place for the dev menu, and I deleted it a bit too early in
#25671.

We can only delete this once we fully swapped over to
`@react-native/dev-middleware`, which is currently only used for the
inspector proxy infrastructure.

# How

- Added back `createJsInspectorMiddleware` from #25671

# Test Plan

- `$ bun create expo ./test-devmenu-debugger --template blank@50`
- `$ cd ./test-devmenu-debugger`
- `$ bun expo install expo-dev-client`
- `$ bun expo start`
- Press `m` in terminal
- Press "Inspect JS" in the menu within the app

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
gabrieldonadel added a commit that referenced this pull request Dec 12, 2023
# Why

Closes ENG-10881

# How

Adds back `createJsInspectorMiddleware` from #25671 to the CLI and
update JS inspector URL on Expo GO and expo-dev-menu to use
`/_expo/debugger`

# Test Plan

Run Expo Go unversioned and dev-client through bare expo and test
opening the debugger through the dev menu on Android and iOS

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Cedric van Putten <me@bycedric.com>
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
…t Native JS Inspector (expo#25671)

# Why

Follow-up of expo#25649

# How

This PR changes two things

1. When pressing `j` in terminal, allow users to select a device using a
select UI. This is copied from the multiple dev tools, and uses the
(known) device name. This replaces the "open all app debuggers" to
confuse users less.
2. When using `EXPO_USE_UNSTABLE_DEBUGGER=true`, the React Native JS
Inspector is used instead of the "classic" Chrome DevTools from SDK
<=49.

It also cleans up the older middleware that handled `/inspector`. This
is now handled by the CDP-spec-compliant `/json/list`. We could also
move everything under `_expo/inspector/...` if this is a problem.

# Test Plan

- `$ bun create expo ./test-debugger --template blank`
- `$ bun expo install expo@canary`
- `$ bun expo install --fix`
- `$ bun expo run:ios`
  - Or `$ EXPO_USE_UNSTABLE_DEBUGGER=true bun expo run:ios`

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Evan Bacon <bacon@expo.io>
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
…devices (expo#25879)

# Why

Correction of expo#25671

# How

- Use `app.deviceName` instead of `app.title`

# Test Plan


![image](https://github.com/expo/expo/assets/1203991/740ab535-3274-43fe-bd23-69fd0c725179)

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
# Why

Closes ENG-10881

# How

Adds back `createJsInspectorMiddleware` from expo#25671 to the CLI and
update JS inspector URL on Expo GO and expo-dev-menu to use
`/_expo/debugger`

# Test Plan

Run Expo Go unversioned and dev-client through bare expo and test
opening the debugger through the dev menu on Android and iOS

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Cedric van Putten <me@bycedric.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants