Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.4
-
Fix Version/s: 1.8.6, 2.0-beta-3
-
Component/s: Ant integration
-
Labels:None
-
Number of attachments :
Description
See this thread: http://groovy-eclipse-plugin.42567.n3.nabble.com/Eclipse-Debugging-Ant-and-Groovy-td3689281.html
GroovyEngine is not creating script names that are understandable by the java debugger. It is basing the generated script name off of the name passed to it by the BSFManager. The only way that the Java debugger can link a compiled script to its source is if the script name matches the name of the source file.
In this case, scriptdef_ is prepended to the script name and breakpoints will not be reached inside of scripts loaded by BSFManager (ie- all scripts loaded by ant tasks).
The solution is simple. Change the logic of org.codehaus.groovy.bsf.GroovyEngine.convertToValidJavaClassname(String) so that it checks the name passed in to see if it starts with scriptdef_. If so, then remove it.
This is an important issue for us as most of the complex logic, of course, is in the Groovy code. If we're not able to have breakpoints work in the Groovy code, it is a significant handicap for us. We encourage adopting a fix at the earliest opportunity.
Is there any workaround that we can employ when debugging in existing environments?