Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Regression: Expressions broken for Remote Java Application in recent Eclipse versions
Regression: Expressions broken for Remote Java Application in recent Eclipse versions [message #1863418] Thu, 01 February 2024 10:13 Go to next message
Ben Unger is currently offline Ben UngerFriend
Messages: 1
Registered: February 2024
Junior Member
We have a command-line build process for our framework, not using Eclipse that generates several JARs that get deployed via Embedded Tomcat. In earlier Eclipse versions (circa 2017), I was able to create an Eclipse project, remove the "src" directory and replace it with a link to our app's source (outside the Eclipse project), and then attach to the running external Java app using a Remote Java Application launcher in Eclipse.

I also added the output JARs from the build to the project, and all the 3rd party JARs used by the app.

With all of this in place, I could set breakpoints, step line-by-line, and most importantly, evaluate expressions in the expression pane.

However, with the most recent versions of Eclipse (2023-09 and 2023-12 tested), expressions don't work. This is horrific! Having to rebuild with logging or print commands makes things much more difficult. Expressions added show no output, and I believe this is connected to what happens when I press ctrl+shift+I after selecting a variable in the code near the breakpoint, which reports,

java.lang.reflect.InvocationTargetException: Unable to evaluate the selected expression:

To perform an evaluation, an expression must be compiled in the context of a Java project's build path. The current execution context is not associated with a Java project in the workspace.
	at org.eclipse.jdt.internal.debug.ui.actions.EvaluateAction$1.run(EvaluateAction.java:270)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

The Java project for the new Eclipses was built in the same way, with the src directory in the project linked to the external Java source. All the fixes for this problem on the web say to make sure that you're linking to the same source and libraries in the project, but as mentioned the app wasn't built with an Eclipse project in my case, as it's an external app. So this is not possible as a solution.

Am I stuck using Eclipse from 2017 or switching to IntelliJ? Why would the devs have made such a mind-boggling change that breaks an important feature? Is my take on this correct and if so would filing a bug have a chance of getting this fixed?
Re: Regression: Expressions broken for Remote Java Application in recent Eclipse versions [message #1863422 is a reply to message #1863418] Thu, 01 February 2024 14:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Maybe start by asking a question here:

https://github.com/eclipse-jdt/eclipse.jdt.core/discussions

In the end, folks will need to be able to reproduce the problem to fix it...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Regression: Expressions broken for Remote Java Application in recent Eclipse versions [message #1865829 is a reply to message #1863422] Tue, 14 May 2024 10:06 Go to previous message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 134
Registered: July 2009
Senior Member
May it will help if you can tell us if you see any difference in the following aspects between the past and now:
1. The .classpath of the projects you created
2. You command line that gets created when you launch your target eclipse
Previous Topic:How to check if a IVariableBinding corresponds to a static effectively final variable?
Next Topic:navigate -> go to -> package is disabled
Goto Forum:
  


Current Time: Mon Jan 20 03:46:30 GMT 2025

Powered by FUDForum. Page generated in 0.03012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top