I have a java application running in IntelliJ. Can I know how to remote debug the application from maven command line.
I tried to use mvnDebug clean install. But this threw me an error saying command not found
I have a java application running in IntelliJ. Can I know how to remote debug the application from maven command line.
I tried to use mvnDebug clean install. But this threw me an error saying command not found
You can use remote debugging:
mvn exec:exec -Dexec.executable="java" -Dexec.args="-classpath %classpath -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044 com.mycompany.app.App"
Then in your eclipse, you can use remote debugging and attach the debugger to localhost:1044. Or configure the goals to debug configuration, create "Maven build" debug config:
Goals = -Dmaven.surefire.debug test
Profiles = myconfigprofile,weblogic
or for a specific TestSuite:
Goals = -Dmaven.surefire.debug -Dtest=com.myorg.mypkg/MyTestSuite.java test
Profiles = myconfigprofile,weblogic
Create additional "Remote Java Application" config:
Host = localhost Port = 5005
You can find more documentation here: http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html