Inspired by https://stackoverflow.com/a/14853683/286795, I'm trying to remotely debug a Maven project using mvnDebug and IntelliJ. However, the execution doesn't stop on my breakpoints. To reproduce a simple Hello World example:
On the local machine:
git clone https://github.com/LableOrg/java-maven-junit-helloworld.git
cd java-maven-junit-helloworld
mvnDebug test
On the remote machine:
- Open IntelliJ
- Check out from Version Control->Git, set URL: https://github.com/LableOrg/java-maven-junit-helloworld.git, Clone
- Open the project
Open Hello.java, set a breakpoint at the line that says
printer.println(HELLO);
Run->Debug...->Edit Configurations..., Add New Configuration->Remote
- Set Debugger mode: Attach, Transport: Socket, Host:, Port:8000
- Apply, Debug
The tests will now run WITHOUT stopping at the breakpoint. Why?