You will need to have gradle installed.
-
Add this
init.gradlefile in your$HOME/.gradledirectory:allprojects { tasks.withType(Test) { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009' } } tasks.withType(JavaExec) { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009' } } }
-
Import the gradle project in Eclipse. You may use plugins like Gradle STS or Buildship.
- Open Eclipse and go to
Run -> Debug Configurations.... - Select the Remote Java Application in the list of configuration types on the left.
- Click the
Newtoolbar button. A new remote launch configuration is created and three tabs are shown:Connect,Source, andCommon. - In the
Projectfield of theConnecttab, type or browse to select the project to use as a reference for the launch (for source lookup). - In the Host field of the
Connecttab, type the IP address or domain name of the host where the Java program is running. If the program is running on the same machine as the workbench, typelocalhost. - In the
Portfield of theConnecttab, type the port where the remote VM is accepting connections. In our case the port will be9009. - Click
Apply.
- For
testtask debugging run$ gradle -DDEBUG=true testin the terminal. - For
runtask debugging run$ gradle -DDEBUG=true runin the terminal.
Now you can use your Eclipse debugger to debug an ATMOSPHERE project.