Bug 571158 - Cannot evaluate expressions in PDE Engine.perform()
Summary: Cannot evaluate expressions in PDE Engine.perform()
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.20   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 571220
  Show dependency tree
 
Reported: 2021-02-12 06:47 EST by Simeon Andreev CLA
Modified: 2023-03-20 20:33 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot showing the problem. (203.33 KB, image/png)
2021-02-12 06:47 EST, Simeon Andreev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.