Regression: Debugger stacktrace shows wrong source file
See original GitHub issue💥 Regression Report
Debugger stops at a debugger
statement but the source file shown is wrong.
Last working version
Worked up to version: v0.58.6
Stopped working in version: v0.59.0
, still happening in v0.59.1
To Reproduce
- Create a new demo app via
react-native init rn059 --version react-native@0.59.1
- Add a
debugger
statement in the beginning of therender()
method inApp.js
- Launch the app on Android
react-native run-android
- Enable debug mode via the in-app debug menu “Debug JS Remotely”
- Notice the debugger coming up and stopping somewhere that doesn’t look like the App.js file. In my case, the debugger stops at file:line
ReactFabric-prod.js:7030
Expected Behavior
In step No5 above, the debugger should stop in file App.js
, right at the beginning of the render()
method where the debugger;
statement is.
Code Example
Link to repo with example code: https://github.com/hypest/rn-059-stacktrace-mess-demo-app
Environment
$ react-native info
info
React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 607.81 MB / 32.00 GB
Shell: 4.4.19 - /usr/local/bin/bash
Binaries:
Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
Yarn: 1.10.1 - ~/.nvm/versions/node/v8.11.3/bin/yarn
npm: 6.3.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 19.1.0, 23.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-23 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.1 => 0.59.1
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why does the stack trace for my jest tests point to the wrong ...
It has to do with source maps. If those are not correctly generated or processed, the debugger will show the wrong line.
Read more >CCES debugger brings up the wrong file when clicking on ...
I now see common files appear in the editor under the same core as I select them from in the debugger stack trace...
Read more >Small Basic: How to Debug - TechNet Articles - Microsoft
In this case, the stack trace shows that main part of the program calls Math.Remainder() and occurs error. Use "Graduate" and Visual Studio ......
Read more >What is a stack trace in debugging? - Quora
If you have the input and the source code, compile the code with debugging information enabled and run it on the same input...
Read more >Debugging — Emscripten 3.1.26-git (dev) documentation
Debug mode, which emits debug logs and stores intermediate build files for ... the output for different compiler settings in order to detect...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Done https://github.com/facebook/metro/issues/380
Thanks, I’ve linked it to the Metro team so hopefully a fix will be out soon