0

I've about we can debug on eclipse into process that is running on Jboss. But I think standard debug is very perfect. I can't find any reason for the existing of debug as remote server.
Anyone can help me explain this feature?

1
  • Yes, I've understood.Thanks for all. Commented Apr 26, 2013 at 9:10

5 Answers 5

1

When you deploy your code to run on a remote server, Eclipse is no longer managing the JVM. Hence the ability to step through code is lost.

To combat this, Eclipse offers remote debugging, which allows you to connect to a socket on the remote server and control the debug session. This requires that the remote JVM was started with socket-based debugging enabled.

Eclipse then lets you control the debug session locally and you will be able to step through your code as per normal. It's rather neat, really.

Sign up to request clarification or add additional context in comments.

Comments

1

Debugging a program running on one system while controlling the program from another system is a clear advantage for debugging, don't you think?

Remote debugging allows you to run the debugger user interface on one system, while running the debug engine on another system.

Comments

1

If you have source code in Eclipse which is deployed on a server and you want to debug specific functionality on server (say submit a request which hits your servlet, REST resource etc), you can add breakpoint in classes to be debugged.

To debug, You start your server with

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

and configure Eclipse to attache it via debug as Remote Application by providing Host,Port and valid connection type.

Comments

1

There are times when you have placed your servers far away from your location (It actually happens in almost every large project), and you would like to debug or resolve an issue from there only. Or you want some expert to look into the problem from their location. This is actually very useful feature.

Comments

0

The code you develop for real applications will be deployed and executed on remote servers and remote debugging is extremely useful to track down an issue in such a case. The source code you need to have in Eclipse must be the exact code that's running in remote server. (Code must be in sync). Also the remote machine (where the code is running) must enabled the debug port for remote access so that it can be accessed from the machine which Eclipse is running.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.