WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
30933
Web Inspector: support for debugging alt-JS files which generate JS
https://bugs.webkit.org/show_bug.cgi?id=30933
Summary
Web Inspector: support for debugging alt-JS files which generate JS
Patrick Mueller
Reported
2009-10-29 15:57:47 PDT
There are quite a few alt-JS language implementations available today - Objective-J (like Objective-C, but for JS), EGL (4GL from IBM), Clamato (Smalltalk), Schemes, Pythons, and Rubys. It would be nice to be able to support these somehow in Web Inspector. Here's the thought. For alt-JS implementations which generate JavaScript code and then eval() it, we can have those implementations make additional debug information available that can map the generated JavaScript code back to the original source. Information such as a URL to the original alt-JS source file(s), a line number map (from original to generated code), etc. The additional information, or pointers to it, would be added to the generated JS files, perhaps in the same kind of comment/directive format used for //@sourceURL= that allows naming your evals. An initial implementation which just supported an alternate source representation and line number map could be used for setting breakpoints and stepping through the code. Dealing with mapping locals and other variables/properties, as well as stack manipulation, would be a lot more work. As a point of reference, some alt-JVM languages make use of existing Java bytecode facilities to handle just the source code/line numbers, and the resulting debugger experience is acceptable (eg, Groovy). Given the alternative source and line number mappings, we can translate requests to/from the the JS engine to render the original source in the debugger views, supporting setting breakpoints, stepping, etc. Tom Robinson noted that Caja seems to be generating debug info like this:
http://code.google.com/p/google-caja/source/browse/trunk/tests/com/google/caja/parser/quasiliteral/testModule.co.js
Should also check with FireBug folks to see if they're doing anything.
Attachments
Add attachment
proposed patch, testcase, etc.
Patrick Mueller
Comment 1
2009-11-04 16:29:51 PST
There was some chit-chat on stuff like this today on es-discuss:
https://mail.mozilla.org/pipermail/es-discuss/2009-November/010103.html
Patrick Mueller
Comment 2
2011-07-08 10:26:06 PDT
Suggest we close this bug as a DUP of
bug 63940
; better yet, since there may be more bugs on this subject, we could have an "umbrella" bug and tie them together with Depends on (or however it's done). I suppose this one could be the umbrella.
Blaze Burg
Comment 3
2014-01-12 16:15:01 PST
Inspector supports source maps.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug