Steps to reproduce:
- Create project that uses testcontainers
- Download testcontainers sources (for example, navigate to GenericContainer.class and clicking 'Download sources' in IntelliJ IDEA)
- Create breakpoint in some file that uses lombok and shading of dependencies: https://github.com/testcontainers/testcontainers-java/blob/master/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java#L629
Result: When breakpoint is hit, instruction pointer point at the different location due to the different between line numbers in bytecode and source.
Additionally, all the shaded dependencies such as org.zeroturnaround.exec.InvalidExitValueException; are shown in red, as they don't exist on the classpath
Expected result:
- I can navigate and step into to any shaded dependency and
- Any breakpoint location works in lombok-enhanced source files.
Solution:
Run
- delombok
- shade plugin
before packaging source jar
Current workaround:
If I want to read sources, I download them
If I want to debug, I manually remove sources from IntelliJ project setup
Steps to reproduce:
Result: When breakpoint is hit, instruction pointer point at the different location due to the different between line numbers in bytecode and source.
Additionally, all the shaded dependencies such as
org.zeroturnaround.exec.InvalidExitValueException;are shown in red, as they don't exist on the classpathExpected result:
Solution:
Run
before packaging source jar
Current workaround:
If I want to read sources, I download them
If I want to debug, I manually remove sources from IntelliJ project setup