On 6/25/14, 1:06 PM, Jason Orendorff wrote:
An alternative involves letting you modify JS code just before it's compiled (source-to-source transformation). This is more general (you could modify the instrumented code arbitrarily, and react synchronously as it executes) but maybe that's undesirable. It's not clear that transformed source would interact nicely with other tools, like the debugger. And a usable API for this is a tall order.

We explored source level instrumentation using the proposed onBeforeSourceCompiled hook (https://bugzilla.mozilla.org/show_bug.cgi?id=884602), and that was a speed improvement (although it required a reload to enable). Unfortunately, priorities caught up with us and we haven't had a chance to revisit.

It /should/ be fine with the debugger so long as you aren't doing too invasive of changes (eg rearranging scopes) and you generate a source map between the original source and the new source. Unfortunately, that can also slow down the transformation quite a bit.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to