You will need to have gradle
installed.
-
Add this
init.gradle
file in your$HOME/.gradle
directory: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
New
toolbar button. A new remote launch configuration is created and three tabs are shown:Connect
,Source
, andCommon
. - In the
Project
field of theConnect
tab, type or browse to select the project to use as a reference for the launch (for source lookup). - In the Host field of the
Connect
tab, 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
Port
field of theConnect
tab, type the port where the remote VM is accepting connections. In our case the port will be9009
. - Click
Apply
.
- For
test
task debugging run$ gradle -DDEBUG=true test
in the terminal. - For
run
task debugging run$ gradle -DDEBUG=true run
in the terminal.
Now you can use your Eclipse debugger to debug an ATMOSPHERE project.