metro icon indicating copy to clipboard operation
metro copied to clipboard

Useless debugger, wrong source map, shifted breakpoints

Open robozb opened this issue 2 years ago • 11 comments

The debugger are useless on this way, the breakpoints is shifted:

https://github.com/facebook/metro/assets/8656998/8dea359d-2d94-4255-9116-b2f8d77de24d

...
  "dependencies": {
    "expo": "~49.0.8",
    "expo-status-bar": "~1.6.0",
    "react": "18.2.0",
    "react-native": "0.72.4"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
...

robozb avatar Sep 05 '23 00:09 robozb

It seems the problem is related with expo sdk 49.

I tried all the things with Expo SDK 48, and the debugger works fine with proper breakpoints!

https://github.com/expo/expo/assets/8656998/65311af8-1e51-4911-b14e-386ea4703c7a

Both demo projects:

  • https://github.com/robozb/ExpoSdk49-Debugger-Error
  • https://github.com/robozb/ExpoSdk48-Debugger-OK

robozb avatar Sep 05 '23 02:09 robozb

I have the same issue since I moved from Expo SDK47 (RN 0.70) to Expo SDK49 (RN 0.72). This is more likely a React Native issue than an Expo issue. I have not tried to debug on SDK48 (RN 0.71). If it works with 48, I may decide to downgrade to 48 until there is a fix for this.

visto9259 avatar Sep 18 '23 14:09 visto9259

@robozb Did you also log this issue in the React Native repo?

visto9259 avatar Sep 18 '23 14:09 visto9259

I don't remember, maybe yes

robozb avatar Sep 18 '23 16:09 robozb

I have the same issue since I moved from Expo SDK47 (RN 0.70) to Expo SDK49 (RN 0.72). This is more likely a React Native issue than an Expo issue. I have not tried to debug on SDK48 (RN 0.71). If it works with 48, I may decide to downgrade to 48 until there is a fix for this.

It works in SDK 48, I have been using it for a long time

robozb avatar Sep 18 '23 16:09 robozb

@robozb I am curious, when did you start using SDK49 and noticed the issue. I upgraded from SDK47 to SDK48 a couple of weeks ago but SDK49 has been released early July. Just wondering if the issue has been there since July or because of some releases of the tools since then (like Metro, expo-metro-config, etc.)

visto9259 avatar Sep 18 '23 17:09 visto9259

The problem arised 2 weeks ago, I started to use SDK49 one or two weeks before that :)

robozb avatar Sep 18 '23 18:09 robozb

The problem arised 2 weeks ago, I started to use SDK49 one or two weeks before that :)

So something got updated in the last 2 weeks that broke the sourcemap generation. Probably worth for you to log an issue with Expo (https://github.com/expo/expo) with your example above and state that this stopped working about 2 weeks.

In the meantime, I downgraded to SDK48 to continue development.

Are you on Windows or Linux? Building for iOS or Android? I am on Windows and building right now for iOS.

visto9259 avatar Sep 18 '23 18:09 visto9259

I'm on win10 the destinatios are Android (emulator and real) and IOS->Iphone. Thanks your advices!

robozb avatar Sep 19 '23 06:09 robozb

I saw that you also opened an issue with Expo https://github.com/expo/expo/issues/24273

Let's see what happens... Regards

visto9259 avatar Sep 19 '23 13:09 visto9259

Hi folks - Expo does have their own debugging front end and have some Expo-specific transform/serialiser customisations, so if this is only reproducible on Expo(?) it should be looked into over there first - https://github.com/expo/expo/issues/24273.

@byCedric LMK if there's anything we can do on this end.

robhogan avatar Sep 19 '23 13:09 robhogan