expo: Useless debugger, wrong source map, shifted breakpoints
Summary
The debugger is useless on this way, the breakpoints are 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"
},
...
Environment
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ~49.0.8 => 49.0.9
react: 18.2.0 => 18.2.0
react-native: 0.72.4 => 0.72.4
Expo Workflow: managed
Please specify your device/emulator/simulator platform, model and version
Properties
avd.ini.displayname Pixel 2 API 30
avd.ini.encoding UTF-8
AvdId Pixel_2_API_30
disk.dataPartition.size 6442450944
fastboot.chosenSnapshotFile
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot no
fastboot.forceFastBoot yes
hw.accelerometer yes
hw.arc false
hw.audioInput yes
hw.battery yes
hw.camera.back virtualscene
hw.camera.front emulated
hw.cpu.ncore 4
hw.device.hash2 MD5:55acbc835978f326788ed66a5cd4c9a7
hw.device.manufacturer Google
hw.device.name pixel_2
hw.dPad no
hw.gps yes
hw.gpu.enabled yes
hw.gpu.mode auto
hw.initialOrientation Portrait
hw.keyboard yes
hw.lcd.density 420
hw.lcd.height 1920
hw.lcd.width 1080
hw.mainKeys no
hw.ramSize 1536
hw.sdCard yes
hw.sensors.orientation yes
hw.sensors.proximity yes
hw.trackBall no
image.androidVersion.api 30
image.sysdir.1 system-images\android-30\google_apis_playstore\x86\
PlayStore.enabled true
runtime.network.latency none
runtime.network.speed full
showDeviceFrame yes
skin.dynamic yes
tag.display Google Play
tag.id google_apis_playstore
vm.heapSize 228
Error output
Debugger breakpoints are shifted
Reproducible demo or steps to reproduce from a blank project
import { StatusBar } from 'expo-status-bar';
import { Button, StyleSheet, Text, View } from 'react-native';
export default function App() {
function a() {
let a=1
a=2
a=3
a=4
a=5
a=6
}
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<Button title="sajt" onPress={()=>{a()}}></Button>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
About this issue
- Original URL
- State: open
- Created 10 months ago
- Reactions: 8
- Comments: 19 (2 by maintainers)
Links to this issue
Commits related to this issue
- chore(devx): fix sourcemap being completely messed up https://github.com/expo/expo/issues/24273 — committed to bamlab/react-tv-space-navigation by pierpo 3 months ago
- chore(devx): fix sourcemap being completely messed up https://github.com/expo/expo/issues/24273 — committed to bamlab/react-tv-space-navigation by pierpo 3 months ago
- chore(devx): fix sourcemap being completely messed up https://github.com/expo/expo/issues/24273 — committed to bamlab/react-tv-space-navigation by pierpo 3 months ago
- chore(devx): fix sourcemap being completely messed up https://github.com/expo/expo/issues/24273 — committed to bamlab/react-tv-space-navigation by pierpo 3 months ago
Using sdk50 and debugger remains useless.
I believe you can change the metro-config version without creating a new dev client.
temporary workaround here.
hi @robozb - this is likely related to this hermes issue: https://github.com/facebook/hermes/issues/1087