Breakpoints not being hit correctly in Expo

164 views Asked by At

I am trying to start using Expo. I was developing react-native bare project apps previously. I do not know what is wrong with Expo but my breakpoints are being hit 2 lines bellow the breakpoint line. I am debugging using default chrome-debugger. This is happening only using EXPO. All my bare projects are working correctly in debug

I am using MBP M2 (apple silicon).

Tried (browser debug console + React Development Tools plugin):

  • Brave Browser
  • Chrome
  • Firefox

Platforms tested:

  • android
  • ios

Types of project init:

  • tsx
  • jsx

I just do stupid init:

npx create-expo-app test
cd test && npx expo prebuild
npx expo run:android

App.jsx:

import { StatusBar } from "expo-status-bar";
import { Button, StyleSheet, Text, View } from "react-native";

const test = () => {
  console.log("Test1"); // <- breakpoint
  console.log("Test2"); // <- breakpoint
  console.log("Test3"); // <- breakpoint
};

export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
      <Button title="click" onPress={() => test()} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});

And see the video, what is happening: https://imgur.com/a/atAxh7l

Does anybody know what is wrong?

Thank you!

EDIT:

It seems this issue has been reported 2 months ago: https://github.com/expo/expo/issues/24273

0

There are 0 answers