mvnDebug tomcat7:run in IntelliJ
mvnDebug tomcat7:run
Now, I know that mvnDebug is equivalent to
MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
Here, suspend=y and I want the suspend=n. Basically, with suspend=y , I have to start the remote debugger in between as the process halts for it. I dont want that. Hence, suspend=n.
So, I ran
mvn tomcat7:run -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
But I am getting this error:
[ERROR] No plugin found for prefix 'runjdwp' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories...
Even if I run above command with suspend=y , still same error.
What should I do ? I am running Java 8
However, when I select the remote configuration in IntelliJ and set it up like this , every thing works fine as expected.

If you see, I have set another configuration before launch (which is just mvn tomcat7:run) as shown below :

So, when I am able to do like this and project runs fine with debugging enabled, then why not when I type the below in IntelliJ terminal :
mvn tomcat7:run -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
Please sign in to leave a comment.
Hello,
Please try this suggestion: https://stackoverflow.com/a/173447/50558
Thanks for reply.
I tried
mvn -Drun.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000" tomcat7:run
after which app ran fine but when in intellij , when I tried to connect to remote debugger , it fails
`Error running 'Debug Site Copy Tool': Unable to open debugger port (localhost:8000): java.net.ConnectException "Connection refused (Connection refused)"`
Here is my remote debugger configuration :
Where am I wrong ?
Could you please check process manager that 8000 port is opened and listening?
no it is not opened.
I ran :
sudo lsof -i :8000
but no output. But app is running at 8080 -
sudo lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 71719 tiwaris 130u IPv6 0xcf27cb439f48348b 0t0 TCP *:http-alt (LISTEN)
You may change MAVEN_DEBUG_OPTS in maven startup script: https://stackoverflow.com/questions/47065467/change-default-mvndebug-port