Java Remote Debug

Writing by 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 Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.