Community
Participate
Working Groups
Our source lookup story is getting better all the time, but it can always be better.
Created attachment 161923 [details] update This patch allows us to better use the source container location info from the launch configuration to open workspace source.
I found that while debugging, I have a habit of editing source when suspended, which then means the source loaded Rhino and my workspace source are no longer in sync, which leads to a lot of confusion the next time the script suspends as all of the line numbers could be off. We should look at ways to keep displayed source in sync with what Rhino actually has loaded.
Created attachment 165913 [details] wip This patch is a work in progress trying to straighten out showing external source + mismatched source (where the source in Rhino is not the same as the found source in the workspace)
With HEAD + wip... I was running the JUnit JavaScript tests for "org.eclipse.e4.languages.javascript.junit.test.AllTests" with "-Drhino.debug=transport=socket,suspend=y,address=9000" set so I could debug and ran into problems. What I did was to set "suspend for all script loads" breakpoint and ran. I didn't see any script appear inially and instead saw <evaluated script> in the stack. After stepping in I found myself in /org/eclipse/e4/languages/junit/test/test.js and this script appeared. Trying to set a breakpoint I got an exception (show below) and the marker did not show up however the breakpoints view did add it although the path it showed there was "/ /test.js". Here's the stack I saw: !ENTRY org.eclipse.wst.jsdt.debug.ui 4 120 2010-04-23 13:19:36.796 !MESSAGE Error logged from JavaScript Debug UI: !STACK 1 JavaScript Model Exception: JavaScript Model Status [<project root> [in ] does not exist] at org.eclipse.wst.jsdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:518) at org.eclipse.wst.jsdt.internal.core.PackageFragmentRoot.buildStructure(PackageFragmentRoot.java:190) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:241) at org.eclipse.wst.jsdt.internal.core.Openable.openParent(Openable.java:435) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:230) at org.eclipse.wst.jsdt.internal.core.Openable.openParent(Openable.java:435) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.openParent(CompilationUnit.java:1116) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:230) at org.eclipse.wst.jsdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:538) at org.eclipse.wst.jsdt.internal.core.JavaElement.getElementInfo(JavaElement.java:282) at org.eclipse.wst.jsdt.internal.core.JavaElement.getElementInfo(JavaElement.java:268) at org.eclipse.wst.jsdt.internal.core.Openable.getBuffer(Openable.java:267) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.getSource(CompilationUnit.java:857) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.editors.JavaScriptBreakpointConditionEditor.setBreakpoint(JavaScriptBreakpointConditionEditor.java:143) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.editors.JavaScriptBreakpointConditionEditor.setInput(JavaScriptBreakpointConditionEditor.java:105) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.editors.CompositeBreakpointEditor.setInput(CompositeBreakpointEditor.java:131) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.details.AbstractDetailPane.display(AbstractDetailPane.java:283) at org.eclipse.debug.internal.ui.views.variables.details.DetailPaneProxy.display(DetailPaneProxy.java:117) at org.eclipse.debug.internal.ui.views.variables.VariablesView.refreshDetailPaneContents(VariablesView.java:1021) at org.eclipse.debug.internal.ui.views.variables.VariablesView$8.selectionChanged(VariablesView.java:965) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:864) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:862) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1670) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1135) at org.eclipse.debug.internal.ui.viewers.model.InternalTreeModelViewer.trySelection(InternalTreeModelViewer.java:1698) at org.eclipse.debug.internal.ui.viewers.model.TreeModelContentProvider.handleSelect(TreeModelContentProvider.java:366) at org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.updateNodes(ModelContentProvider.java:1375) at org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.updateNodes(ModelContentProvider.java:1380) at org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.updateModel(ModelContentProvider.java:1327) at org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.doModelChanged(ModelContentProvider.java:1298) at org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.modelChanged(ModelContentProvider.java:1277) at org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy$1.run(AbstractModelProxy.java:87) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy.fireModelChanged(AbstractModelProxy.java:91) at org.eclipse.debug.internal.ui.viewers.update.BreakpointManagerProxy$1.runInUIThread(BreakpointManagerProxy.java:173) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4012) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3631) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2416) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2380) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2229) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:504) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:497) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1406) at org.eclipse.equinox.launcher.Main.main(Main.java:1382) !SUBENTRY 1 org.eclipse.wst.jsdt.core 4 969 2010-04-23 13:19:36.796 !MESSAGE <project root> [in ] does not exist !ENTRY org.eclipse.wst.jsdt.debug.ui 4 120 2010-04-23 13:21:01.406 !MESSAGE Error logged from JavaScript Debug UI: !STACK 1 JavaScript Model Exception: JavaScript Model Status [<project root> [in ] does not exist] at org.eclipse.wst.jsdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:518) at org.eclipse.wst.jsdt.internal.core.PackageFragmentRoot.buildStructure(PackageFragmentRoot.java:190) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:241) at org.eclipse.wst.jsdt.internal.core.Openable.openParent(Openable.java:435) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:230) at org.eclipse.wst.jsdt.internal.core.Openable.openParent(Openable.java:435) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.openParent(CompilationUnit.java:1116) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:230) at org.eclipse.wst.jsdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:538) at org.eclipse.wst.jsdt.internal.core.JavaElement.getElementInfo(JavaElement.java:282) at org.eclipse.wst.jsdt.internal.core.JavaElement.getElementInfo(JavaElement.java:268) at org.eclipse.wst.jsdt.internal.core.Openable.getBuffer(Openable.java:267) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.getSource(CompilationUnit.java:857) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.editors.JavaScriptBreakpointConditionEditor.setBreakpoint(JavaScriptBreakpointConditionEditor.java:143) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.editors.JavaScriptBreakpointConditionEditor.setInput(JavaScriptBreakpointConditionEditor.java:105) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.editors.CompositeBreakpointEditor.setInput(CompositeBreakpointEditor.java:131) at org.eclipse.wst.jsdt.debug.internal.ui.breakpoints.details.AbstractDetailPane.display(AbstractDetailPane.java:283) at org.eclipse.debug.internal.ui.views.variables.details.DetailPaneProxy.display(DetailPaneProxy.java:117) at org.eclipse.debug.internal.ui.views.variables.VariablesView.refreshDetailPaneContents(VariablesView.java:1021) at org.eclipse.debug.internal.ui.views.variables.VariablesView$2.runInUIThread(VariablesView.java:380) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4012) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3631) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2416) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2380) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2229) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:504) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:497) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1406) at org.eclipse.equinox.launcher.Main.main(Main.java:1382) !SUBENTRY 1 org.eclipse.wst.jsdt.core 4 969 2010-04-23 13:21:01.406 !MESSAGE <project root> [in ] does not exist
The last issue reported on comment #4, and some additional polish was added in the fix for bug 310949. I think we can mark this as fixed now.