Community
Participate
Working Groups
I debug an Eclipse Application JUnit 4 test [1] I put a breakpoint in a method [2] for which I don't have the source in my workspace (it's in the Java rt.jar) but the source attachment (src.zip from the JDK) is configured in Preferences > Java > Installed JREs. When the debugger stops into the method, I see the Java source of the class (com.sun.org.apache.xerces.internal.impl.XMLEntityManager in my case). When hovering over variables in the method, I don't see any value. And when I try Ctrl+D or Ctrl+I on the method parameters or local method variables, I get: xx cannot be resolved as a variable. In the "Variables" view, I see "this" and "arg0", but not the other local variables, even after I have stepped after their initialization. I have the source, the debugger is suspended on the breakpoint in the method, and the method is selected in the stack, so I think it should work. [1]https://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.modisco/tests/trunk/org.eclipse.modisco.jee.webapp.discoverer.tests/src/org/eclipse/modisco/jee/webapp/discoverer/tests/TestNoUri.java [2]com.sun.org.apache.xerces.internal.impl.XMLEntityManager#resolveEntityAsPerStax
This is with: Eclipse SDK Version: 3.7.0 Build id: I20110613-1736
(In reply to comment #0) > When hovering over variables in the method, I don't see any value. > And when I try Ctrl+D or Ctrl+I on the method parameters or local method > variables, I get: xx cannot be resolved as a variable. > > In the "Variables" view, I see "this" and "arg0", but not the other local > variables, even after I have stepped after their initialization. > > I have the source, the debugger is suspended on the breakpoint in the method, > and the method is selected in the stack, so I think it should work. The confusion is because the class files for the JDK are not compiled with the debug attributes. In this case (missing debug attributes) we can show you the source (if you have attached it) and we can assign variables names (arg0, arg1, etc, etc) - but we have no information about what the 'real' names of the variables are. The reason the hover does not work is because we try to look up the name of the variable you hover over - the name from the source - and we only know the variables as arg0, arg1, etc. There is nothing more we can do about the debug attributes not being present, but perhaps we could improve the hover support to somehow resolve which variable to look for a bit better.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.