- This topic has 3 replies, 2 voices, and was last updated 19 years ago by Greg.
-
AuthorPosts
-
Bart VerweireMemberHi,
I’m trying to get the javascript debugger working, but it doesn’t seem to work well.
I’m using a combination of html, css and javascript (currently merely testing, so I could send the code if necessary). Here’s some code that causes the debugger to behave strangely (just for reference, I added the line numbers):
19 function parseJSONTree(){
20 var id=””;
21 var name=””;
22 var jsonTxt=this.req.responseText;
23 var jsonObj=eval(‘(‘+jsonTxt+’)’);
24 var locations=jsonObj.locations
25
26 var infoPanel = document.getElementById(‘locations’);
27 var locationTree = new tree.Tree();
28 locationTree.fill(jsonObj, ‘locations’);
29
30 locationTree.display(infoPanel);
31
32 showLocations(locations, 0);
33 }When I start debugging the initial html file, the debugger correctly stops at the first breakpoint.
if this breakpoint is set at line 20 : then I can successfully use the step over button, it proceeds to the next line, and the variables view correctly shows the modified values of variables id and name.
In line 22, a json text file is read into memory. This is located in the same directory as the html and js files.
But at line 23, the debugger stops to work. The step into, step over, and resume buttons are being disabled (grey buttons, can’t click them anymore).If I set the first breakpoint at line 30 (as an example), the variables id and name are correctly shown in the variables view, but any variable that has been defined after line 23 is shown as ‘undefined’, although the script runs when not in debug mode.
From that point on, the step into and step over buttons don’t work anymore. Step into just moves to the next line, without performing the code in the function.Here’s the stack :
parseJSONTree() DataJSONTree.js [Line: 30]
parseJSONTree() DataJSONTree.js [Line: 23]
call() [built-in] [Line: 1]
anonymous() net.js [Line: 59]
call() [built-in] [Line: 1]
anonymous() net.js [Line: 40]In the error log, I found the following :
!ENTRY org.eclipse.core.runtime 4 2 2005-12-25 11:25:12.282
!MESSAGE An internal error occurred during: “Fetching children from debug target”.
!STACK 0
com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040111
at com.jniwrapper.abstractcom.impl.AbstractComImpl.doInvokeStandardVirtualMethod(AbstractComImpl.java:422)
at com.jniwrapper.xpcom.mozilla.impl.NsISupportsImpl.invokeStandardVirtualMethod(NsISupportsImpl.java:84)
at com.jniwrapper.xpcom.mozilla.jsdservice.impl.JsdIStackFrameImpl.getThisValue(JsdIStackFrameImpl.java:218)
at com.genuitec.javascript.debug.model.JSStackFrame.getVariables(JSStackFrame.java:73)
at org.eclipse.debug.internal.ui.elements.adapters.DeferredStackFrame.getChildren(DeferredStackFrame.java:35)
at org.eclipse.debug.internal.ui.elements.adapters.DeferredStackFrame.fetchDeferredChildren(DeferredStackFrame.java:57)
at org.eclipse.debug.internal.ui.views.RemoteTreeContentManager$FetchJob.run(RemoteTreeContentManager.java:86)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)Hope this gives you enough information. I’m looking forward to a solution, as I think the js debugger could be a tremendous help for my developments.
Thanks,Bartlebooth
My configuration :
*** Date: Sun Dec 25 11:07:41 CET 2005
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.4.2_05*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.0.200 M2
Build id: 20051205-4.1-Milestone2*** Eclipse details:
Eclipse SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse Project SDK
Version: 3.1.1
Build id: M20050929-0840Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Program Files\Dev\Eclipse 3.1\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
318_50
-vm
C:\WINDOWS\system32\javaw.exeI found this in the error log, but it’s probably not related to the phenomenon that I am describing here. But for your information :
!ENTRY org.eclipse.ui 4 0 2005-12-25 10:24:42.132
!MESSAGE Warning: Detected recursive attempt by part com.genuitec.eclipse.webdesigner.htmleditor to create itself (this is probably, but not necessarily, a bug)
!STACK 1
org.eclipse.ui.PartInitException: Warning: Detected recursive attempt by part com.genuitec.eclipse.webdesigner.htmleditor to create itself (this is probably, but not necessarily, a bug)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:543)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:223)
at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:477)
at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:402)
at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:372)
at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:1780)
at com.genuitec.eclipse.core.util.EditorUtil.getEditorForInput(Unknown Source)
at com.genuitec.eclipse.core.util.EditorUtil.checkConflictingEditor(Unknown Source)
at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.init(HTMLMultiPageEditorPart.java:765)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:778)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:384)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:283)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:126)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:391)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1102)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1051)
at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:785)
at org.eclipse.ui.internal.PartStack.access$0(PartStack.java:771)
at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:119)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:126)
at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)
at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)
at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:84)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:867)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:660)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3138)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1922)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
!SUBENTRY 1 org.eclipse.ui 4 0 2005-12-25 10:24:42.132
!MESSAGE Warning: Detected recursive attempt by part com.genuitec.eclipse.webdesigner.htmleditor to create itself (this is probably, but not necessarily, a bug)
GregMemberHello Bartlebooth,
It appears you have identified an issue so to help us replicate this problem could you send us all the files needed to reproduce this issue? You can zip them up and send to support@genuitec.com and label it with ATTN GREG and I will get a copy of your zip file. Also with the email, could you list the steps necessary to see the issue?
Thanks for submitting this report, and if you can send us these files we will take a look asap.
Bart VerweireMemberHello Greg,
I sent you the files recently. You did receive them, I hope ?
Regards,Bartlebooth
GregMemberI did receive them and will be evaluating it shortly. Thanks again for sending the files.
-
AuthorPosts