Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript as debuggable bytecode

There is a rise in languages that output javascript, such as CoffeeScript and ClojureScript. Since javascript will not be going away anytime soon, I presume this pattern of development will continue.

One problem people have is that you write code in one language and debug in another. The same can be said about the relationship between C and assembly, but assembly generated can have debugging metadata embedded so that the C debugger knows how the assembly relates to the C source sode. So for example: the line number that this block of assembly represents.

And now for my question:

Is anyone aware of any similar efforts to allow for debug metadata to be embedded in the resulting javascript from languages such as CoffeeScript and Clojurescript?

As far as I am aware this would require at least a debugger that supports this theoretical metadata.

like image 832
BefittingTheorem Avatar asked Aug 16 '11 11:08

BefittingTheorem


1 Answers

Yes. Firefox and Webkit-based browsers are planning to support debugging for CoffeeScript and other languages that compile to JS: http://www.infoq.com/news/2011/08/debug-languages-on-javascript-vm

like image 137
Trevor Burnham Avatar answered Oct 04 '22 03:10

Trevor Burnham