You are here

Remote debugging with Eclipse

It is possible to start an application ready for remote debugging by using the Maven mvnDebug command. Eclipse or another development environment can then connect to the running application for remote debugging.
Make sure the project you want to debug has been imported into Eclipse if not already present there (you may have created the project via the command line rather than in Eclipse).
Sometimes it is necessary to remote debug an application. For example, if you want to debug an application running on Linux, but the developer platform is Windows. The command mvnDebug can be used to start the application in remote debugging mode, where it will listen on port 8000 for a remote debugger.
  1. Change into the Maven project directory.
  2. Run mvnDebug rather than the mvn command.

    The Maven project will start and listen for a remote debugger on port 8000.

  3. In Eclipse, select Run > Debug Configurations from the main menu.
  4. Select Maven Build and click the New icon on the top left of the dialog.
  5. Give the Debug Configuration a suitable name.
  6. Click Browse Workspace and select the base directory of the project you wish to debug.
  7. For Goals enter clean install.
  8. For Profile enter amp-to-war.
  9. In the Main tab ensure that Debug Output is selected.
  10. Click Apply.
  11. On the JRE tab add the following VM arguments:

    -Xms1024m -Xmx4096m -XX:PermSize=1024m -javaagent:/Users/tbedford/Downloads/springloaded-1.2.0.RELEASE.jar -noverify to avoid PermGen exceptions, and to enable Spring Loaded.

  12. Click Apply.
  13. Click Debug to run the Debug Configuration.
  14. In Eclipse, enable the Debug perspective by selecting Window > Open Perspective > Debug from the main menu.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.