History log of /expo/packages/@expo/cli/src/start/server/metro/inspector-proxy/proxy.ts (Results 1 – 4 of 4)
Revision Date Author Comments
# 70e5585a 07-Jul-2023 Kudo Chien <[email protected]>

[cli][inspector-proxy] fix devtools websocket connection on windows (#23367)

# Why

fixes #23332
close ENG-9233

# How

windows does not support `0.0.0.0` or `[::]` as loopback address. in th

[cli][inspector-proxy] fix devtools websocket connection on windows (#23367)

# Why

fixes #23332
close ENG-9233

# How

windows does not support `0.0.0.0` or `[::]` as loopback address. in these case, we should fallback to `localhost` or `[::1]`.

# Test Plan

test devtools on windows

show more ...


# 033ea1fc 04-Jul-2023 Cedric van Putten <[email protected]>

refactor(cli): disable inspector proxy inline source maps for vscode only (#23258)

# Why

With SDK 49, I noticed a multi-second delay in breakpoints getting
bound. This is likely due to [Metro in

refactor(cli): disable inspector proxy inline source maps for vscode only (#23258)

# Why

With SDK 49, I noticed a multi-second delay in breakpoints getting
bound. This is likely due to [Metro inlining sourcemaps as base64
strings](https://github.com/facebook/metro/commit/6690b393cc1812af02f8eb20853504f0a6188a83)
for tools like the chrome debugger. In practice, it generates a huge
base64 string that causes this delay when decoding in vscode.

# How

- Added `debuggerType` to connect to the inspector proxy as a certain
debugger type (e.g. `vscode` or `generic` <- default)
- Added override for `Debugger.scriptParsed` to disable inline
sourcemaps for vscode only.

# Test Plan

~~TBD, since this also requires an update in vscode-expo (add the
`type=vscode` as query param when connecting to the inspector proxy).~~

This is now included in `[email protected]`

# 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: Expo Bot <[email protected]>

show more ...


# f5fa30f6 16-Jun-2023 Cedric van Putten <[email protected]>

feature(cli): allow client-side device ids to reuse debugger sessions when restarting app (#22742)

# Why

After using the debugger for some time, I noticed a really annoying
behavior when the app

feature(cli): allow client-side device ids to reuse debugger sessions when restarting app (#22742)

# Why

After using the debugger for some time, I noticed a really annoying
behavior when the app crashes or is restarted manually. See
https://github.com/facebook/metro/issues/985 for more info.

# How

This adds support for client-side unique device identifiers, such as
"installation ids" or "device ids". Similarly to future support within
Metro: https://github.com/facebook/metro/pull/991

# Test Plan

See updated tests, and the test plan at
https://github.com/facebook/metro/pull/991

> - Create a new project, and enable building from source on both
Android & iOS
> - **android**: edit [this
file](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java#L282-L289)
in `node_modules/react-native` and add a hardcoded
`&device=testingandroid` query param.
> - **ios**: edit [this
file](https://github.com/facebook/react-native/blob/main/packages/react-native/React/DevSupport/RCTInspectorDevServerHelper.mm#L43-L53)
in `node_modules/react-naive` and add a hardcoded `&device=testingios`
query param.
> - Connect the debugger to the running app
> - Force close the app, which should cause a "reconnect" warning in the
debugger
> - Open the app again, and press "reconnect" in the debugger
> - _Due to the stable identifiers, the URL won't change and the above
scenario should work fine_

# 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).

show more ...


# 5234fe38 08-Mar-2023 Cedric van Putten <[email protected]>

feature(cli): add custom inspector proxy based on `metro-inspector-proxy` (#21449)

# Why

Fixes ENG-7467

Related #21265

This is an initial draft to extend the CDP functionality of
`metro-in

feature(cli): add custom inspector proxy based on `metro-inspector-proxy` (#21449)

# Why

Fixes ENG-7467

Related #21265

This is an initial draft to extend the CDP functionality of
`metro-inspector-proxy`.

# How

The implementation is slightly wonky around the `ExpoInspectorDevice`.
We want to reuse as much as possible from `metro-inspector-proxy`, but
we need to add stateful data per device.

In order to achieve that, we generate a new class type, based on the
user's installed `metro-inspector-proxy`. This makes everything less
readable but should include future updates in these classes.

As for the `ExpoInspectorProxy`, to avoid having to do the same thing,
we just wrap the whole inspector class and reuse what we can. The device
map is "linked" within the original inspector proxy instance, making the
data available to all methods that need it.

# Test Plan

Enable this feature with `EXPO_USE_CUSTOM_INSPECTOR_PROXY=1`

- [x] See tests for the actual CDP events we handle.
- [ ] See tests on the "bootstrapping code" to create the inspector and
devices.

# 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 `expo prebuild` & EAS Build (eg:
updated a module plugin).

---------

Co-authored-by: Evan Bacon <[email protected]>

show more ...