We do need a good way to inspect the JavaScript heap when it contains data structures from non-JavaScript languages. However, I'm not convinced this should be represented as data. It seems better to represent it as a reflection API that's implemented as a JavaScript library provided by the compiler. The debugger can load the javascript file into the web page when needed, and it can use whatever data format it likes.<p>Chrome is working on a way to this [1]. However, it's not done yet, and it needs to be be turned into a real standard. It's also not likely to work well for asm/wasm as-is.<p>New standards are important but we also need to properly implement the standards we already have. Sourcemaps have been around for years but they're not fully implemented by most browsers that claim to support it. (Firefox sourcemaps didn't work well when I tried it in January, though some bugs have been fixed since then.) I think someone needs to write something like the Acid tests [2] for browser debuggers.<p>[1] <a href="https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/edit#heading=h.xuvxhsd2bp05" rel="nofollow">https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQK...</a><p>[2] <a href="http://www.acidtests.org/" rel="nofollow">http://www.acidtests.org/</a>
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).<p>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 :)).<p>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.<p>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 )<p>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).
"We can embed snippets of JavaScript within the debugging data to locate a binding's value." - I see this as a security risk, but then again so much code is executed by the browser so it probably is okay.