Hi Daniel,

Thanks for the code confirmation.

Yes I can confirm it works fine for me in Win7, Eclipse 2023-03 and JDK 17.
You can add a line above a breakpoint and all works as expected.

On the other hand, it work as if it was Java in a Virtual Box.
At least for me in VB 7, Ubuntu 20.04, Eclipse 2023-03 and JDK 17.
That means that Eclipse asks you if you want deconnect, continue (at your own 
risk), etc.
And Eclipse tells you that it's specific to the VM context.

Jacques

Le 02/05/2023 à 08:55, Daniel Watford a écrit :
Hi Jacques,

Sorry for the late reply - it has been a busy May-day bank holiday weekend
here in the UK.

I think you have already checked this, but yes, you can indeed modify
Groovy script code while OFBiz is running. The script will be re-loaded
(and internally recompiled) by GroovyUtil#getScriptClassFromLocation.

Although at first glance it appears that GroovyUtil has a PARSED_SCRIPTS
cache, so I'm not sure why the updated script is loaded. Perhaps some other
process is running to invalidate the cache on file update.

I have not delved into the details of how IntelliJ maps loaded classes to
source files. I assume there is a mechanism that detects the loading of new
classes and figures out a mapping of class back to source file, meaning
that once a groovy script is loaded, all breakpoints in that script's
source file become live while debugging and will move appropriately
following source code changes.

Dan.

On Sat, 29 Apr 2023 at 13:12, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

Hi Daniel,

Do you know how are reacting dynamically changed Groovy scripts while you
are Debugging them, at least in Eclipse (I don't use Intellij).
The big advantage of minilang was its faculty to allow dynamic changes,
like Freemarker does. We have the same advantage with Groovy.
But I wonder for dynamically changed Groovy scripts while you are
Debugging in Eclipse.
For instance for Java it's sometimes allowed, but sometimes you need to
reload all :/

Jacques

Le 28/04/2023 à 12:30, Daniel Watford a écrit :
The reason for checking is that groovyScripts are loaded as independent
scripts and compiled at runtime by OFBiz (See
GroovyUtil#getScriptClassFromLocation), rather than being loaded from a
pre-compiled JAR.

Reply via email to