Skip to content

Comment on Source Maps Are an Insufficient Debugging Format for the Web

Comments

I'm fairly new to the web-development, and on my new job I've been tasked to use java (new to me) with gwt (just knew the name) which is translated to javascript (yes, not enough experience there).

Now SourceMaps and Chrome/Firefox debugging tools are great savers. I wish Eclipse had better debugging (actually it seems it has, since it's also new to me, the curve for learning it is much steeper - I'm an ex - Visual Studio Debugger guy :)).

But even with SourceMaps gwt translated (from java->javascript) names do not always match - often _g or _0 _$ are added, and object properties are intermixed with original java defined ones, and some internal - I'm used to it now, but was wondering whether it would've been better if it work ideally (e.g. show real Java "view" of the things even from the "Javascript" land). While this might've been the right choice, what I have now gives me more usable information.

What doesn't work always, is that sometimes the debugger would display the javascript, not java code (maybe gwt's fault, or something I do incorrectly with gwt's SuperDevMode )

I wish there is an option (for gwt, and other languages) to somehow show the transition, and allows intermixing when displaying. To give you an example - When debugging "C/C++" code most of the debuggers can intermix the assembly generated code in there... I'm not sure whether this would be as good as intermixing java and javascript (or say another language with javascript) because they look very similar, but at least to allow me to sometimes see the javascript, rather than always show me the java code (it's possible that this is already available, and I haven't found it yet).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.