-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Source maps are broken when using houdini plugin #1154
Comments
Ah damn, sorry to hear that! Getting the sourcemaps wired up correctly has been a long running thorn in my side. Do you have any time/energy to hunt this down? If so I'd gladly offer any guidance you need |
Unfortunately I'm v time poor at the moment but happy to at least see how hard it would be and help if I can. As you say Recast should be handling it but (from previous discussion) looks like there's string interpolation e.g. here. I also noted that this affects .ts files as well as .svelte files so it's likely not the only issue... thorny indeed :) |
Is it a reason that trace backs are also broken? When it points to unrelated pieces of code, not to actual issue source. |
This is causing so many issues for us too - would be great to solve! |
Do you have any idea what's causing this? I'd like to at least attempt to track this down, but it'd be great to have a starting point. |
For anyone running into this thread - I reached out to knd on discord where the back and forth is a bit easier 😅 |
Ran into the same issue, making Unit tests effectively non-debuggable. Would be great to have this resolved soon. |
I put together a minimal reproduction, if anyone wants to attempt to hunt this down :) Simply open the devtools and hit the "fetch data" button. I also found this tool to visualize the sourcemaps, could be useful for debugging this: https://evanw.github.io/source-map-visualization/ |
Anyone have any pointers if I wanted to take a look? This section where the code is modified without updating the sourcemap seems suspicious to me, but I could be wrong and am not really sure where to go from there. I build the project and messed with it a bit and checked the reproduction above, but I'm not super familiar with sourcemaps so wasn't able to get anything working. Edit: It seems to be more about the query than the whitespace at the start/end of the script tag, so I guess I'm still looking for advice 😅 |
I dug into this around a month back, this is what I understand is happening so far:
|
Describe the bug
Apparently due to the source transformation that happens in the houdini plugin.
Source maps being broken is affecting our ability to trap errors with Sentry etc - v difficult to debug our large app at all now.
This issue was discussed on discord here but adding to github to see if community can help address.
Thanks!
Severity
serious, but I can work around it
Steps to Reproduce the Bug
To reproduce in the HoudiniGraphQL/example-sveltekit-todo repo, I've added a single debugger statement to the top of handleClick() in
lib/ItemEntry.svelte
, when triggered the Chrome debugger has the line significantly wrong. Manual breakpoints set in Chrome / vscode also don't line up due to the incorrect source map.Reproduction
No response
The text was updated successfully, but these errors were encountered: