You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ladislav Gazo edited this page Aug 29, 2015
·
1 revision
Debugging annotation processor (maven based)
Have you ever wrote your own annotation processor and don't know how to debug it? If you prefer maven for executing annotation processors (IMHO it is currently the best way, because eclipse compiler still have some bugs or different behaviour comparing to standard java compiler API / processor API), you can setup debug environment really easy in a few seconds.
Steps:
Add java debugging options
set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
start maven execution
mvn processor:process
depends on your maven configuration
because of suspend=y parameter compiler will wait until the debugger is attached
Listening for transport dt_socket at address: 8000