Java Remote Debug

Writing by shivdev on Thursday, 12 of August , 2010 at 4:45 pm

It’s easy to forget the options required to start a Java process with Remote Debug turned on at some port. So, to attach your Eclipse (or other IDE) debugger to a running Java process you need to start that process with the following Java options.

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

Start your Java process with these parameters. Then you can use your IDE to connect to this process.

For Eclipse,

  • In Eclipse, navigate to Run | Debug Configurations…
  • Create a new Remote Java Application (in the left column)
  • Fill in the required values and in the port enter 5096 and click Debug to attach to the process

Leave a comment

Category: Eclipse,Java

No Comments

No comments yet.

Leave a comment

You must be logged in to post a comment.

Shivdev Kalambi's Blog

Shivdev Kalambi is a Principal Software Engineer working at ArcSight. He has over 11 years' experience in software development and has worked with several technologies and played different roles and contributed to all phases of projects. Other non-tech activies include Ping-pong, Racquetball, Rock Climbing at PG and Swimming.