-
Notifications
You must be signed in to change notification settings - Fork 45
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
What is the easiest way to debug an error on RS? #129
Comments
Personally, I have no problems reading the transpiled JS that RS produces, so I have no motivation to implemnt map files. But certainly in principle they could be implemented. But it is going to require work from someone other than me, i'm afrad. |
@kovidgoyal me too, but not everyone are able to read it that easy. Can you give me some instruction or references to make source map files? |
I came accross this: https://github.com/mozilla/source-map Turnout its not that easy to make source maps. Either you have to read the ast per line, or you pin point the compiled and original code line and column yourself... |
All ast elements in RS contain line and column information for use in error messages, should not be hard to translate that into map files. |
Hey Kovid, it's been years since I've been developing with RapydScript and it really helps me in many things. Thanks for your work. Just one quick question, what's the best way to debug RapydScript errors? Especially the runtime errors not the compilation error (since the compiler points the direct code). Because first the javascript itself doesn't print the exact code line if the error is from a Promise, and then after searching for the code that cause the error with catch, it's a transpiled javascript which is harder to read for beginners (especially one who haven't know javascript or even new ES6 javascript developers can't seem to understand too). Because this bugs us a lot. It's actually not a problem for me but my colleagues depends on me in debugging the errors, I'm a bit confused about were they the one that weren't smart enough or I that was forcing them to use RS was silly.
This is actually a personal issue but I want to clear them up, do you have any suggestion? Maybe should I integrate RS to webpack? Or is it easy to add map files to RS?
The text was updated successfully, but these errors were encountered: