Bug 567205 - Unable to evaluate the selected expression
Summary: Unable to evaluate the selected expression
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-21 09:34 EDT by Mario Jauvin CLA
Modified: 2020-09-21 15:40 EDT (History)
3 users (show)

See Also:


Attachments
Error when inspecting code (10.01 KB, image/png)
2020-09-21 09:34 EDT, Mario Jauvin CLA
no flags Details
Error when adding a condition to the breakpoint (9.27 KB, image/png)
2020-09-21 09:34 EDT, Mario Jauvin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Jauvin CLA 2020-09-21 09:34:07 EDT
Created attachment 284208 [details]
Error when inspecting code

Using the branch flatten-maven-plugin from this maven project https://github.com/marioja/mavenmodule/tree/maven-flatten-plugin

In Enterprise Explorer view, under Maven Dependencies I double click the org.codehaus.mojo.flatten.FlattenMojo.class from the flatten-maven-plugin-1.2.2.jar plugin to open the source view (after eclipse downloaded the source jars).  I setup a breakpoint on line 599:

        Model originalModel = this.project.getOriginalModel().clone();

The first symptom is that the breakpoint blue circle does not appear in the left margin even though the breakpoint appears in the breakpoint window.

I then click on debug and when the debugger stops on line 599, when I select any variables (like problems on the previous line) and click inspect I get the attached dialog.  If I click watch (instead of inspect), the variable is added to the Expressions but it does not resolve.  If I try to add a condition on the breakpoint, I get an compilation error as per the second screen shot.
Comment 1 Mario Jauvin CLA 2020-09-21 09:34:55 EDT
Created attachment 284209 [details]
Error when adding a condition to the breakpoint
Comment 2 Mario Jauvin CLA 2020-09-21 09:36:25 EDT
Would it be possible for all three problems to be fixed against this bugzilla?

1. inspect
2. watch expression
3. conditional expression
Comment 3 Mario Jauvin CLA 2020-09-21 10:26:22 EDT
I forgot to mention that the maven dependencies will show up in the project mod1.  You should also pull the latest changes.
Comment 4 Sarika Sinha CLA 2020-09-21 14:44:41 EDT
Are you debugging a Java project ? Message says that it does not have Java context.
Comment 5 Mario Jauvin CLA 2020-09-21 15:40:12 EDT
(In reply to Sarika Sinha from comment #4)
> Are you debugging a Java project ? Message says that it does not have Java
> context.

mod1 is a java project.  but in reality, it does not matter because I am debugging a maven run configuration, so that is a java program and since the breakpoint is hit and execution stops, I have to be running a java project.  It think that the test case with the test project I provided describes this eloquently.