Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 33733 - Can't evaluate variables inside JDK code.
Summary: Can't evaluate variables inside JDK code.
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 384697 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-04 05:37 EST by Omry Yadan CLA
Modified: 2012-07-10 10:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Omry Yadan CLA 2003-03-04 05:37:15 EST
When I step into jdk code, I can't evaluate variables.
eclipse says that the selected stack frame is not associated with a project.
Comment 1 Darin Wright CLA 2003-03-04 09:14:40 EST
If the code opened in the java editor is not part of the workspace, evaluation 
cannot be performed. For example, if you build with one JDK and run with 
another, you may step into "external source" (i.e. source for the runtime JDK 
that is not on the project build path).

Is this the case?
Comment 2 Omry Yadan CLA 2003-03-04 09:31:25 EST
I checked, and indeed the jdk I ran and compiled with were not the same.
I fixed it, but I could still not evaluate.
this time I got a different message:
var cannot be resolved
(where var is the variable I tried to evaluate).
Comment 3 Darin Wright CLA 2003-03-04 09:35:40 EST
Can you provide the specific example that you are having problems with (or re-
create a simple example)? It would help.
Comment 4 Omry Yadan CLA 2003-03-04 09:42:48 EST
its very easy to reproduce (on my machine).
for example, if I do 
new Vector(5);
and step into it, once I am inside Vector ctor, I can't evaluate 
initialCapacity.
(can't be resolved).
Comment 5 Darin Wright CLA 2003-03-04 10:10:22 EST
This is because the library is not compiled with debug attributes - and thus we 
cannot resolve argument names. This will also be the case for local variables. 
We can only resolve member variables in the case that debug attributes are not 
present.
Comment 6 Darin Wright CLA 2003-03-04 10:12:11 EST
Marking as "wont-fix". Without debug attributes, we are not aware of local 
variables, and cannot do the proper resolution. (CC'ing Luc to make sure he 
agrees).
Comment 7 Omry Yadan CLA 2003-03-04 10:21:54 EST
I am not certain, but I am pretty sure that when I worked with JBuilder, I 
could debug into the JDK code (with evaluation etc).
this suggests that it might be possible.

do you have a suggestion for a workaround? (do you know if sun provide a 'debug 
jdk'?
Comment 8 Darin Wright CLA 2003-03-04 10:50:31 EST
None that I know of. Luc, do you know of any work arounds?
Comment 9 Luc Bourlier CLA 2003-03-04 11:22:36 EST
I confirm that if the debug attributs don't contains information about the local
variable, we cannot performed evaluation which used these local variable, there
is no way to retrieve the value of these variables.

The only JDK I know which contains debug attributs is J9.

A workaround is to recompile the JDK with the debug attributs (I think there was
a discution about that on the newsgroup in the beginning of last year)
Comment 10 Michael Rennie CLA 2012-07-10 10:11:03 EDT
*** Bug 384697 has been marked as a duplicate of this bug. ***