Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 895 Bytes

File metadata and controls

23 lines (19 loc) · 895 Bytes

Overview

  1. How to debug Java compiler & Annotation processor

Run compiler via IDEA

  1. Enable Debug Build Process
  2. File | Settings | Build, Execution, Deployment | Build Tools | Gradle
    1. Build and run using: IDEA
  3. File | Settings | Build, Execution, Deployment | Compiler | Annotation Processors
    1. Enable Annotation Processor
  4. Create debug configuration
    1. Remote JVM Debug
    2. Name/Label: Use something like Debug Java compiler
  5. Add breakpoint in annotation processor
    1. eg. lombok.launch.AnnotationProcessorHider.AnnotationProcessor::init
  6. Build (CTRL+F9)
    1. The console shows a message like:
Executing pre-compile tasks…
Build: waiting for debugger connection on port 44355