-
Notifications
You must be signed in to change notification settings - Fork 613
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
Not able to debug w/ Chrome #164
Comments
Yeah, I've been hitting this one for months. I'm only encountering this issue in files that contain multiple global functions (e.g. redux action files). I haven't encountered this in react component files which follow the pattern of stuffing most functions inside a single global react component class declaration. My far from ideal workaround is to move the function under test to be the last function in the file. Doing this allows you to set breakpoints within this last function. |
This issue was also being tracked in react-native and someone posted solution there... Replace There can't be ANY functions in the source file you're trying to set a breakpoint in.
|
Wow! Thanks!
…On Jan 26, 2017 3:04 PM, "wookiem" ***@***.***> wrote:
This issue was also being tracked in react-native and someone posted
solution there...
Replace
function someFn() {}
with
const someFn = () => {}
There can't be ANY functions in the source file you're trying to set a
breakpoint in.
facebook/react-native#10729
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#164 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABORPJ4ud--c93gnqNz2N0VqNNEgClBzks5rWQpYgaJpZM4Ky48D>
.
|
@bartonhammond I was thinking about rewriting everything to ES6 since we're transpiling with babel anyway. In fact I already did that in my project so I should be able to create a PR fairly easy. |
@siemiatj Sounds good - just make another PR! Many thanks |
I advise Vanilla JS if you can help it. Until the browsers (and node) add support for ES2015 imports/exports, you may be painting yourself into a corner unless you can get your binary packed up and off your plate. Just saying. |
I won't agree here. We're using babel to transpile JSX anyways, and almost all examples now are written with ES6 syntax. It's still vanilla JS :) Node won't support modules probably for a while since it's problematic to implement (the last thing I heard). |
Just FYI, you should try this again with RN 0.42. Evidently they refactored the source map generation, I tried it with our app in the areas where multiple functions in a file were having this issue and it seems to be fixed now. |
See facebook/react-native#10729
The text was updated successfully, but these errors were encountered: