Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 221889 - Variable in conditional breakpoint can be resolved, but not found during evaluation
Summary: Variable in conditional breakpoint can be resolved, but not found during eval...
Status: RESOLVED DUPLICATE of bug 45507
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-07 13:37 EST by Robert Konigsberg CLA
Modified: 2009-06-09 13:48 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 Robert Konigsberg CLA 2008-03-07 13:37:05 EST
Build ID: M20080221-1800

Steps To Reproduce:
Create a breakpoint in org.eclipse.core.runtime.Plugin.class, line 353, in method getPluginPreferences, which looks like this:

preferencesCopy[0] = new org.eclipse.core.internal.preferences.legacy.PreferenceForwarder(this, bundleCopy.getSymbolicName());

Edit the breakpoint properties to create this condition:

"bundleCopy == null"

Do it by typing "bund" and pressing CTRL-SPACE. The content assistant will find "bundleCopy"

Save the breakpoint with the nice new properties.

Start up an instance of Eclipse in debug mode. When the VM tries to run over that line, a dialog appears:

TITLE: Conditional Breakpoint Error
Detail: Conditional breakpoint has compilation error(s). Reason: bundleCopy cannot be resolved.


More information:
Comment 1 Cameron Bateman CLA 2008-03-07 16:46:50 EST
+1

I have seen several similar problems.  With method parameters the problem is often the same, although I notice in such cases the parameter will show up in the "Variables" view as argN, where N is the index of the param in the parameter list.  Interestingly, the watchpoint expression seems ok with this.  I saw this occur for example in CopyOnWriteArrayList in the SDK.  Perhaps it's not shipping with full symbols active?

Also, there are problems resolving types.  For example if want to say "foo instanceof org.eclipse.core.resources.IResource" it will often show up fine in the content assist of the breakpoint editor but then result in an unresolved expression error at runtime.
Comment 2 Cameron Bateman CLA 2008-03-07 16:48:24 EST
Just noticed that 3.2.2 was set as the version.  I have seen my behaviour in 3.4M5.
Comment 3 Darin Wright CLA 2009-06-09 13:48:31 EDT
This is a dup of bug 45507. Evaluations in inner classes currently cannot access variables from the enclosing scope.

*** This bug has been marked as a duplicate of bug 45507 ***