Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.2
-
None
Description
[dev list mailing reference: Debugging maven with breakpoints feed-back: --jdwp + docs]
Problem:
Currently its hard to enable remote debugging for a remote debugger of your IDE.
Basically you need to set MAVEN_OPTS something like:
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
mvn ...
and unset it again.
Solution:
1) Make it easier, choices:
A) Provide a command line option to do this (--debug is already taken for debug logging), choices:
a) mvn --jdpa
b) mvn --jdwp
B) Provide a different script: mvnDebug
to avoid parsing command line arguments in bat and shell
C) Find a generic way to give options on the command, like -mx etc to the java process, possibly by namespacing them?
2) Document it in mvn --help
3) Document it on http://maven.apache.org/guides/development/guide-m2-development.html
like so (APT):
Debugging with breakpoints
You can attach a remote debugger of your IDE to the maven process.
This will allow you to set breakpoints (line, exception, ...).
Start maven in debugger mode on port 8000:
+--
mvn ??? install
+--
If you want to change any of the debugger settings,
use MAVEN_OPTS instead.
Then connect to the correct port with a remote debugger in your IDE.
Attachments
Issue Links
- relates to
-
MNG-3867 Support MAVEN_OPTS in mvnDebug script
- Closed