-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vendored Device class is broken when it comes to debugging #578
Comments
hi @yard, thanks for reporting that! We're currently working on supporting the new experimental debugger in #508, not sure what's going to happen with legacy remote debugging since it's already deprecated in RN, so we might just leave Flipper + experimental debugger. @RafikiTiki what's your take on this? |
hi @jbroma, happy to help and thank you for amazing work on the library! |
Hey @yard – as @jbroma mentioned we're currently migrating to the new package exposed by the RN corre team – Since Remote Debugging will be removed by the RN core team, we won't be supporting this. We'll definitely treat the experimental debugger as the main focus. As for the Flipper, since it would have to be manually configured from the next version (https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks#flipper--react-native-integration) – it might need some additional configuration work that I'm not sure if should be done on the Repack or the consumer side – we'll see how this will play out once the experimental debugger changes are released in v4. |
Environment
Nothing specific, an empty react-native project with installed repack (I have used 3.7.0, but other versions might be affected too).
Description
Vendored version of
metro-inspector-proxy/src/Device.js
is flawed: it does not handleDebugger.getScriptSource
properly when the script URL is an actual URL, not a file path. Since it is the case for every development build (the script source is actually the URL to a bundler endpoint), Chrome DevTools would display an error message instead of the script source, making debugging impossible.Conveniently enough, react-native developers have accounted for that in their implementation – I have tried replacing the
Device
class with the one taken from@react-native/dev-middleware
package and it seems to be working flawlessly.I am curious if there is any reason for using the vendored version?
Reproducible Demo
Try debugging any project with Chrome DevTools.
The text was updated successfully, but these errors were encountered: