Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug delomboked code in IntelliJ?

In my Maven based project I'm using Lombok to save some boilerplate code. Furthermore I'm using a Spring Data library which uses AspectJ to get things done. Sadly, Lombok and AspectJ don't play nicely together out of the box, as the AspectJ compiler recompiles the Java files. So the implemented Getter and Setters of Lombok are lost.

I decided to delombok my code using the Lombok Maven plugin. This code is then passed to AspectJ. This is the basic flow:

Sources in /src/main/java or /src/test/java
=> [Delombok] 
=> Delomboked sources in /target/generated-sources/delombok or /target/generated-test-sources/delombok
=> [AspectJ]
=> Compiled results in /target/classes or /target/test-classes

However, one downside to this approach: I seem to have lost debug support using IntelliJ. Breakpoints set in a /src/main/java or /target/generated-sources/delombok Java file are never hit. I run the project using the IntelliJ Maven plugin, selecting a lifecycle item (e.g. "test"), the debug hooks. Sadly, the breakpoints are never hit.

What can be done to get back debugging support?

like image 384
spa Avatar asked Jan 22 '13 11:01

spa


1 Answers

I didn't find a solution. Thus, I delomboked the source code and done it with plain vanilla Java... sad :-(

like image 120
spa Avatar answered Sep 19 '22 15:09

spa