this did help me quite alot for debugging Groovy scripts when invoked via GroovyShell. However, this still only works, when the script is loaded via fully qualified file name (e.g. file:///home/user/x/src/main/groovy/package/File.groovy).
When I use
URL url = Thread.currentThread().getContextClassLoader().getResource("src/main/groovy/package/File.groovy");
shell.parse(new File(url.toURI));
it fails (CompilerConfiguration with debug enabled is set beforehand).
So, my scripts reside in the classpath and have packages assigned. They execute with both (via File directly and via File+Classloader resource) - but IDE debugging only works when referring to it as file resource (relative! so with "wrong" src/main/groovy/ prefix.
FYI - the scripts should later be included in JAR file and entire application will be execuded as a WAR.
Any hints on what I can try?
Thanks and best regards, Timo