How to debug Groovy code via the remote Java application debugging in Eclipse

随声附和 提交于 2019-12-05 14:07:41

First, a suggestion. Set suspend=y in your Xrunjdwp:transport option. This will suspend in main and will give you a better idea as to whether or not your problem is with your debug options or the Groovy code.

Now, on to something more complicated. Yes. There are some issues regarding debugging of remote Groovy code. The problem generally comes about when Groovy code is loaded dynamically. In this case the debug name often does not match the source name and the debugger does not know how to match the dynamically loaded class file with the original source code.

One such problem is described here (and there are no doubt other places where similar things happen): https://jira.springsource.org/browse/SPR-7113

So, my suggestion to you is that if possible you should ensure that your groovy code is pre-compiled before being sent to the server. (And also set suspend=y.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!