Simon,
This is perhaps a silly question, but can one use this debugger to
debug scripts that are compiled using the ClassCompiler?
I've gotten to the point where I can attach the debugger to an
existing ContextFactory, but the "debugger" keyword doesn't seem to
work - execution doesn't stop, the various Rhino threads all say
"running". I'm suspect that this is because I'm using compiled vs.
interpreted mode here.
Thanks!
bobby
On May 26, 2010, at 11:58 AM, Simon Kaegi wrote:
Eclipse JSDT has been working on a debug platform which for our
integration
with Rhino that uses a remote debugger protocol very similar to the v8
protocol. The team is also working closely with the Firebug guys on a
"crossfire" version. This is the first release of the JavaScript
debugger
however is fully functional and essentially done in terms of coding
for this
year's release -- we're now working on documentation.
If you want to look at the code --
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jsdt/plugins/?root=WebTools_Project
The "rhino.debugger" project is the bit that integrates with the rhino
runtime and all the other "debug" projects help to provide the UI and
JavaScript debug platform. The debugger is implemented as a
ContextFactory.Listener and listens for a special property to provide
configuration...
ContextFactory contextFactory = new ContextFactory();
String rhinoDebug = context.getProperty("rhino.debug"); // In
eclipse this
is generally provided via system property
if ( rhinoDebug != null) {
RhinoDebugger debugger = new RhinoDebugger(rhinoDebug);
debugger.start();
contextFactory.addListener(debugger);
}
This "rhinoDebug" string is something like the
following -Drhino.debug=transport=socket,suspend=true,address=9000
in this
case e.g. a system property but you can of course inject that string
into
RhinoDebugger however you like.
If you just want to use a rhino debugger well we're about to release
RC3 and
that version should be very close to the final bits. I'll provide a
link
when it's ready and perhaps put together a podcast to show how to
use it.
If you're keen and know your way around eclipse you can download a
recent
eclipse 3.6 build [1] as well as clicking through to the latest "wst
sdk"
build repo[2][3] and download that somewhere. Add the wst sdk zip as
an
archive in the install software ui and then install the "JavaScript
Development Tooling" from the zipped repo and you should have the
debugger.
-Simon
[1] Eclipse SDK -- http://download.eclipse.org/eclipse/downloads/
[2] WTP Development - http://build.eclipse.org/webtools/committers/
[3] WTP Release - http://download.eclipse.org/webtools/downloads/
"Bobby Rullo" <bo...@metaweb.com> wrote in message
news:mailman.727.1274307571.19335.dev-tech-js-engine-rh...@lists.mozilla.org
...
Hi all,
I saw that there was some work being done by Attila Szegedi on making
Rhino talk the v8 debugger protocol, so I checked out the stuff at
dynalang, but it doesn't seem to be in a compilable state (missing
files,
methods)- is there something more up-to-date somewhere else, or has
someone else done something similar?
Thanks!
Bobby
_______________________________________________
dev-tech-js-engine-rhino mailing list
dev-tech-js-engine-rhino@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
_______________________________________________
dev-tech-js-engine-rhino mailing list
dev-tech-js-engine-rhino@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino