-
Notifications
You must be signed in to change notification settings - Fork 762
[Breakpoints] U+2028 and U+2029 characters throw off pause locations #5782
Comments
I tried to reproduce this and found: When we open It considers all the statements under line 328 which should be 323. |
hmm, that's interesting @AnshulMalik. can you share a bit more... Maybe some surrounding code? |
wow great discovery, i wouldn't have thought of that. Can you please walk us through your process a bit more |
So, here is the process, how I discovered those chars:
And if we remove those |
CC @jimblandy this might be an interesting pause points bug to investigate... |
There may be other cases I'm missing, but there is two primary issues here. One is easy to fix, but the other is harder. Essentially, the issue is that JS has 5 newline tokens (
While those two are easy to fix, there's one more that I came across. CodeMirror itself. CodeMirror splits all input code on
The only downside here, which I'm not sure we can resolve easily, but is probably enough of an edge case that we accept it, is that pulling code out of CodeMirror joins all the lines back together with a
In the original user code, the 2 last object keys are two unicode characters, but when copy-pasted from CodeMirror, they are converted to Finally, Additionally, we should enable the |
I think I'll take a shot at this one. Haven't worked in this area yet, so I'll likely have some questions for you all once I get started 😄 |
/claim |
Thanks for claiming the issue! 👋 Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to 🦊 Debugger team! |
I haven't really started on this, but I have some time tonight that I am dedicating to this. I am having difficulties reproducing the issue though. http://www.ximalaya.com/14647138/album/6527131/ no longer seems to use I figured that probably wasn't a blocker, since you can still grab After that I figured I would just manually add I can still go about the easy fix, but I think I'd like to have my STR work so I am sure about what I am fixing. Any advice here @loganfsmyth |
Here's an example: https://scandalous-spoon.glitch.me/ You can see for instance that if you click on Line 7, and refresh it doesn't really break where you expect, and not all the logs have executed. Also as the comments (and the line markers on the console messages say), the line numbers on the log statements are not what the editor shows. You can also see the parser worker logging |
Awesome, thanks for that @loganfsmyth |
I realize one other question in all of this is, I have no idea if the line numbers in sourcemaps for instance are actually supposed to align with this value, or purely be based on the line numbers based on CRLF/LF line endings. |
I posted on ESDiscuss since I'm curious: https://mail.mozilla.org/pipermail/es-discuss/2018-October/051854.html |
@WenInCode Realistically, it might be worth waiting to do much on this for now. |
@loganfsmyth ok, most of what I had done up until now was the easy part and adding some tests around it. I am okay holding off on it. Should I unclaim it until its fate is certain? |
I'm not sure what the normal procedure is for |
@WenInCode I think at this point it's not worth trying to hack up CodeMirror to get it to render these as newlines, but if you have tweaks for the other things I mentioned, we might as well land those changes. What specifically have you put together so far? |
@AnshulMalik thanks for testing against VSCode, we didn't recognize |
If more people run into this, we can consider addressing it in the future, but for now it does not seem like a priority for us. |
Issues met when working with this issue https://webcompat.com/issues/16130
Actual: Nothing is happening
Expected: breakpoint is set.
The text was updated successfully, but these errors were encountered: