Bug 567205

Summary: Unable to evaluate the selected expression
Product: [Eclipse Project] Platform Reporter: Mario Jauvin <mfj>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: gayanper, mistria, sarika.sinha
Version: 4.16   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Error when inspecting code
none
Error when adding a condition to the breakpoint none

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.