Simon,
Using the recently released Eclipse 3.6 and WTP 3.2, I was able to install the
JavaScript Debugger through the standard 'Install New Software...' update.
I then used the
org.eclipse.wst.jsdt.debug.rhino.debugger_1.0.0.v201005200117.jar file to
bundle it with my standalone software that uses Rhino internally, created the
RhinoDebugger as described in your message and managed to connect to it from
Eclipse successfully!
But when I tried to debug any scripts, I run into a row of issues.
Whenever I try to set a breakpoint in any of the scripts, I get a lot of
Exceptions such as the one below. Is there anything I am doing wrong?
This all looks very promising and I cannot wait to finally get it working.
Jürg
java.lang.IllegalArgumentException
at
org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1016)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1480)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:734)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1417)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:2637)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2662)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:317)
at
org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1142)
at
org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.convert(JavaScriptUnitResolver.java:262)
at
org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:887)
at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
at
org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:581)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:574)
at
org.eclipse.wst.jsdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:509)
at
org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:150)
at
org.eclipse.wst.jsdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:135)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
On 26 May 2010, at 19:58, 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" <[email protected]> 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
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino