How to debug maven plugin

I found out that new maven 3.0.5 is broken (, I would like to fix it since it seriously affects me.

My question is, how to debug it? It runs in a separate process. I would expect to see some switch to make it run without it, but I found none.



I'm not 100% sure but I think the maven integration may use the external builder API. If so you can try this:

  1. In your development IJ launch you locally compiled version of IJ with the -Dcompiler.process.debug.port=<port-number> system property set.
  2. In your development IJ define a "remote" debug/run debug configuration which connect to the port you have chosen in 1)
  3. put the desired breakpoints
  4. Now in the "sandbox" IJ trigger the maven plugin
    1. it may start but nothing will happen: the external builder plugin (its JVM) waits for de remote debug connnection
    2. Go to your development IJ (i.e. not sandbox one) start the remote debugging

As I said I'm not postive it will work for the maven plugin. What I described is how it works for me for my external plugin development

See for more info

Hope it can help.



Thanks, it got me on the right track, and I found a system property "idea.maven.embedder.debug.port" which does the trick you described.


Please sign in to leave a comment.