Java Remote Debug

A former colleague left me a voice mail asking for help in setting up a remote debugging for a running Java process. She is now a director at a small security startup. I thought that if this was helpful for her, it might be useful for other peeps. What follows is basically the instructions I sent her via an email.

To be able to attach your Eclipse debugger to a running Java process you need to start that process with the following Java options…

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

Once you have done this and have restarted the server, you can use your Eclipse to attach to the running process. From Eclipse go to the Debug manager and create a new Remote Java Application configuration for the process you want to connect to. Set the port number to 8001, the same as that of the options. You will also need to enter the hostname for the machine running the Java process. That is pretty much it…

Technorati Tags: , , , , ,

Related posts:

  1. Remote Debug Your Thinking Process
  2. Hard To Debug
  3. Access Drives From Remote Windows Computers
  4. Shutdown Remote Windows
  5. EclipseWebEnabler Review

This entry was posted in Java, Programming, TechKnow. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. Venkat
    Posted May 13, 2009 at 12:47 am | Permalink

    Excellent, and very useful tip. Thanks

  2. Sunil
    Posted July 2, 2009 at 2:15 am | Permalink

    Simple, short, to the point,…. Nice.

  3. Posted November 14, 2011 at 9:23 pm | Permalink

    One important thing to note while doing remote debugging in Java is that code version must be same on both Eclipse IDE and remote machine, otherwise you will see inconsistent results while debugging.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*