-
Aug 18th, 2010, 10:39 PM
#1
JavaScript Debugger: unable to open file
I'm developing in Spring Surf 1.0.0-M2 using Roo:
---------------------------------------
roo> addon list
Add-ons dir..: /Applications/roo/add-ons
spring-surf-roo-addon-1.0.0.M2-roo-addon.zip (345427 bytes)
roo>
---------------------------------------
I am attempting to run the JavaScript debugger by selecting "Start/Stop Javascript Debugger" on the Surf Command Console (http://localhost:8080/community/console). When I select "Enable", the Javascript Debugger window appears. When I try to open a file using File->Open, I get the error below. This happens for every JavaScript file I attempt to open, including the sample files provided with Surf.
Tomcat 6.0.20
Java 1.5.0_19-b02-304
Thanks,
Bob
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: No such child: 1
at java.awt.Container.getComponent(Container.java:280 )
at org.mozilla.javascript.tools.debugger.FileWindow.u pdateToolTip(SwingGui.java:2181)
at org.mozilla.javascript.tools.debugger.FileWindow.< init>(SwingGui.java:2161)
at org.mozilla.javascript.tools.debugger.SwingGui.cre ateFileWindow(SwingGui.java:486)
at org.mozilla.javascript.tools.debugger.RunProxy.run (SwingGui.java:3525)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 461)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:110)
-
Aug 19th, 2010, 03:27 AM
#2
To use the debugger, the easiest way to start is to simply select "Debug -> Break on Function Enter", then run your page/webscript and you'll see once the appropriate JS file has been *automatically* loaded by the debugger you can then disabled that option and put a breakpoint anywhere you want it. I wouldn't suggest trying to load the files yourself, the debugger will do it for you!
FYI The JavaScript debugger interface is part of the Mozilla Rhino package (org.mozilla.javascript.tools.debugger) - the code is not part of SpringSurf itself.
Cheers,
Kev
-
Aug 19th, 2010, 04:09 AM
#3
Kev,
Great. Execution is now stopping when I select "Debug -> Break on Function Enter". The debugger shows thread information at the bottom, "Thread: Thread[http-8080-5,5,main]" Progress!
However, there is no code displayed, "this" and "locals" panels are blank, and the step controls (Sep Into, Sep Over, Step Out) are inactive.
Thanks for your help!
Bob
-
Aug 19th, 2010, 05:40 AM
#4
OK - not sure why you can't see any code. I assume the "Go" button is also inactive?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules