vert-x/vert.x — pull request #344 by jockm (2012-09-08 23:57:56+00:00)
Title: Added Rhino Debugging

This pull request enhances the Rhino Vertical by allowing it to launch Rhino's build in [GUI debugger](https://developer.mozilla.org/en-US/docs/Rhino/Debugger).

The `RhinoVerticalFactory` now checks for the System property `vertx.debugRhino`,and if it is set to true, then it selects a different `ContextFactory` which supports debugging.

RhinoVertical is also changed to check the same property and sets the context optimization level to -1 — this turns off compilation and all optimizations. The Rhino debugger only works in interpreted mode.

I then added two new scripts: vertxrdbg and vertxrdbg.bat, which are identical to the vertx and vertx.bat scripts (respectively), except that they set the aforementioned property.

**A small note on why I used a system property**
I would have preferred to have added a command line option (such as -debugRhino) instead of a system property; but I could find no obvious and clean way to do either a command line option that didn't take a parameter, nor communicate that value to the `RhinoVertical`.

Obviously you guys are more familiar with the code and can tacle it if you wish.

Please do not hesitate to contact me if you have any questions of comments — either though github or at jock@jockmurphy.com.

Thanks,
Jock