1
votes

I have created a maven plugin via maven-archetype-mojo. My intellij version is: IntelliJ 2018.1.7

And I have tried the following steps to initiate the remote debugging process.

  1. I created a remote debug configuration and pointed it to port 8000
  2. I run mvnDebug clean install in the terminal of the project folder, and it showed:
    1. Preparing to execute Maven in debug mode Listening for transport dt_socket at address: 8000
  3. Then I run the remote debug option, it returned:
    1. Connected to the target VM, address: 'localhost:8000', transport: 'socket'
  4. And in the terminal the plugin started to rebuild. After the rebuild remote debug session is disconnected.

This is my configuration for remote debug: enter image description here

Any ideas?

Console output when connect with remote debug:

Preparing to execute Maven in debug mode
Listening for transport dt_socket at address: 8000
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< com.alibaba.rhino:mc-generator >-------------------
[INFO] Building mc-generator maven plugin 1.0-SNAPSHOT
[INFO] ----------------------------[ maven-plugin ]----------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ mc-generator ---
[INFO] Deleting /Users/shuohuang/Projects/mcgenerator/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.394 s
[INFO] Finished at: 2019-01-16T16:43:07+08:00
[INFO] ------------------------------------------------------------------------
1

1 Answers

1
votes

Your remote debug setup looks correct, I tried it with a custom maven-plugin and it worked for me.

I would suggest you to update to the latest IntelliJ version, if possible. This is currently IntelliJ 2018.3

If this does not resolve your problems, you should check your maven-plugin on errors. An error or wrong start of the maven-plugin could cause the build to break.

When possible, provide the output of the maven-plugin or code examples.