Do you wish you could debug with your local Eclipse a Java program running on an other machine ... remotely?

Remote Debugging

The General debug flow.

In order to debug with your Eclipse a Java program that runs on an other machine, you will need to configure two components, one in the remote machine (Where the Java program runs) and the second is a local configuration addition to your Eclipse IDE.

The Remote machine will run the Java program using a special command line argument which will tell the JVM that an external debugger will connect to it and how it will connect to it (Connection type, Port etc).

The Local Machine which runs Eclipse should use a special debugging mode, configured to connect to the remote Java program.

The Explicit configurations.

Configuring the Remote Java program.

When running the program just add these command line arguments after the "java" command before the "-jar" argument (For more detailed information about these arguments - read the article which it's link is attached below):

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y

Configuring the Local Ecipse IDE.

In order to attach and debug the remote program, press on the "Run" menu and Choose "Debug..." in which you will see a special launcher called "Remote Java Application", Configure the basic connection settings and you are ready to go...

Remote Java Debugging using Eclipse


Popular posts from this blog

How to read Android apk contents

SCummVM for Android

Start Working with AutoIT