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
'show source' does not work on first run when debugging #612
Comments
Hi @nouvist, thanks for reporting this bug, I've confirmed that I can reproduce it as described. In a debug build it initially just prints |
Also noticing this as I attempt to upgrade to RN 0.65.2 to enable Hermes as a prerequisite to I'm not able to get the expected behavior after changing a line and allowing the application to reload. Guessing I may need to upgrade to Hermes 0.9.0 for that. I also tried to use Any news on a potential fix for this? |
Same problem on my side. Works in release tho. |
Upvoting this issue - its a bit of a bummer now that the functionality for |
working when I created a new expo app, but when I implemented it in my existing old expo app it did not work. Have not try in release yet. |
I am nothing near as familiar to low level programming. sorry that I couldn't contribute any code to this repo. but currently, this plugin will throw an error when using it on function declaration. so, if you wanna use it, use arrow function or function expression instead. and also, Hermes behavior will override the |
I can confirm the behavior is the same on ios. Initially renders with |
Well this has just became a problem again after upgrading Expo SDK to 48 and React Native to Update: Using the plugin that @nouvist developed addressed the issue for me:
|
@nouvist also solved another problem with its solution: the transpilation to es5 which broke my code since it introduced helper functions that are not available in the function itself. Thanks so much! Only had to remove the typescript types (wrote another hacky babel plugin for that) |
Bug Description
gradle clean
and confirmed this bug does not occur with JSCHermes version: 0.9.0
React Native version (if any): 0.66.1
OS version (if any): Android 11
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): arm32_64binder
Steps To Reproduce
react-native android
code example:
The Expected Behavior
The
Function.prototype.toString()
should return string of its function script.The Actual Behavior
It return
function() { [bytecode] }
instead. But, after I change some line, it does work. So, it is works after HMR on the file that using'show source'
, not on first run / after manual reloading / HMR on other file.But when I build as release variant, it works as expected.
The text was updated successfully, but these errors were encountered: