-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
Investigate Firefox Sourcemap issues #1725
Comments
I should add that when there are no errors in the jsx file the page still renders correctly, but the behavior persists (cannot load source file). Errors are reported from lines that do not exist in html file which makes bugs hard to track down. Confirmed on Windows 7 and Firefox 29. I can add more details once I get back to work on Monday - just let me know what information you need. Thanks, |
What exactly is the issue? If it's just source lines being "off/out of bounds" then it's possible that it's the old JSX issue where source lines reported by esprima are mysteriously offset. AFAIK it was never explicitly solved, but no one was able to reproduce it anymore, perhaps it struck again? Other than that, JSX is just sugar on-top of esprima (and source-map I assume), and I think even the above issue is/was, so I don't think JSX is necessarily the root cause here. |
Hi @syranide, thanks for responding. At the most general level, the problem I am trying to solve is this: I want to be able to use the JSXTransformer script and be able to see a useful version of my compiled JS script which (pre-compilation) had JSX in it. I want to do this so that when I make an error in my JSX-containing JS script I can get a useful error message and hopefully see where the problem is in my original script (or get some clue as to where the problem might be). As it stands now, when I have an error in my script, the console just complains about lines which do not exist in my HTML file (which is only a few lines). So it'll say there's an error in line 65 of example.html even though example.html is only 15 lines. Compounding the problem is that, even when there were no errors and the JSX compiled perfectly to JS and the JS file ran just fine, I still cannot see any sources other than the JSX compiler, the reactjs source and my jquery source. I can't see either a uncompiled or compiled version of my JSX-containing JS file. Instead, what I see is this:
Hopefully that explains everything, but let me know if you're still confused. I can provide more info when/if you need it. Thanks |
@syranide When I tested last week I couldn't get the source map to do anything at all in Firefox. |
Figured it out. I can't decide if it's a Firefox issue or something we're doing wrong, but react/vendor/browser-transforms.js Line 128 in 7715063
cc @fitzgen from the Firefox devtools team, might be worth looking into on your end as well (can't remember if I filed that bug). |
@zpao Can we keep the full path but drop the domain-part perhaps? |
@syranide Good idea, I changed to doing that :) |
@zpao, would love a minimal test case. Can you repro with just mozilla/source-map, or only while using devtools? |
It was reported to me on IRC today and confirmed on master / FF nightly myself. Also facebook/react-devtools#40
The text was updated successfully, but these errors were encountered: