Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable debugging of plugin while running integration tests #180

Closed
arunkjn opened this issue Jan 18, 2021 · 2 comments
Closed

Enable debugging of plugin while running integration tests #180

arunkjn opened this issue Jan 18, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@arunkjn
Copy link

arunkjn commented Jan 18, 2021

Is your feature request related to a problem? Please describe.
I am not able to set breakpoints in the plugin code when running integration tests.

Describe the solution you'd like
While running the integration tests in debug mode, it would be nice to be able to break on the breakpoints within the plugin code. Normally this would happen when we run maven with mvnDebug on the host application which is using the plugin, and then attaching a remote debugger to it.

@arunkjn arunkjn added the enhancement New feature or request label Jan 18, 2021
@scholzb-hb
Copy link

We have the same feature request. Our current workaround (on Windows):

  1. Create a copy of your local Maven installation with suffix "-debug", e.g.:
    C:\maven\apache-maven-3.6.0-debug
  2. Open the file "C:\maven\apache-maven-3.6.0-debug\bin\mvn.cmd" and add the following lines at the top:
setlocal
set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
  1. In the IDE, run your integration test(s) with the following system property:
    maven.home=C:\maven\apache-maven-3.6.0-debug
  2. In the IDE, connect the debugger to the remote JVM at port 8000

The last step must be repeated for each integration test (when running multiple tests), since execution will always halt at the beginning of the Maven process (due to "suspend=y").

@khmarbaise
Copy link
Owner

Can you please take a look on the branch issue-186 and read the docs as well and maybe give some feedback if this helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants