Figured it out:
- from the command line, run maven goal with
mvnDebuginstead ofmvn. E.g.mvnDebug clean - Open the source of the maven plugin you want to debug in intelliJ and set a breakPoint
- In IDEA, add a
Remote JVM DebugConfiguration.- Under Settings, set Transport: Socket, Debugger Mode: Attach, Host: localhost, Port: 8000 (default port of mvnDebug).
- Run the Configuration in Debug mode. It should connect to the waiting mvnDebug jvm.