Bug 571158

Summary: Cannot evaluate expressions in PDE Engine.perform()
Product: [Eclipse Project] JDT Reporter: Simeon Andreev <simeon.danailov.andreev>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: loskutov
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 571220    
Attachments:
Description Flags
Screenshot showing the problem. none

Description Simeon Andreev CLA 2021-02-12 06:47:38 EST
Created attachment 285539 [details]
Screenshot showing the problem.

When I try to run evaluations with the Debug Shell view, while at a breakpoint in org.eclipse.equinox.internal.p2.engine.Engine.perform(IProfile, IPhaseSet, Operand[], ProvisioningContext, IProgressMonitor), I see errors:

for (int i = 0; i < operands.length; ++i) {
	System.out.println(operands[i]);
}
	Evaluation failed. Reason(s):
		Syntax error, insert ";" to complete BlockStatements

To reproduce:

1. Debug Eclipse with a breakpoint in Engine.perform().
2. From the debuggee Eclipse, try to install any new software via main menu Help -> "Install New Software..." (go through the steps until the breakpoint is hit).
3. Try to evaluate the statements above, observe errors.

Same with other statements, trying to print the contents of "operands", e.g.:

for (Operand o : operands) System.out.println(o);
Comment 1 Simeon Andreev CLA 2021-02-12 07:31:00 EST
There seem to be many corner cases with JDT evaluations. I wonder if the Debug Shell could provide an "advanced mode", where the user is allowed to see, and edit, the entire snippet that JDT generates. As opposed to only the snippet that the user wrote. It would have the benefit of maybe being able to fix whatever is wrong that JDT generated. A downside would be that maybe fewer bug get reported to JDT, since the user can "fix" the problem themselves, and would not care to spend time reporting an actual bug.

Should I open a ticket for this Andrey? Might make sense to at least discuss it. I've been hindered quite often by evaluations not working (both for conditional breakpoints and for evaluations in the Debug Shell view).
Comment 2 Eclipse Genie CLA 2023-03-20 20:33:32 EDT
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.