Debugging Remote Applications

C

Christian

Hello

I am often programming jse applications that I can only test in large
numbers.. so I use a small cluster of computers as testenviroment..

Now I often find myself in the bad situation that debugging only works
by viewing logfiles..

But is there any chance for me with java to get a debugging view like in
eclipse for local apps also for a remote application.. with
breakpoints/breakpoints on exceptions and introspecting the state of
the objects ?

Christian
 
T

Thomas Fritsch

Christian said:
Hello

I am often programming jse applications that I can only test in large
numbers.. so I use a small cluster of computers as testenviroment..

Now I often find myself in the bad situation that debugging only works
by viewing logfiles..

But is there any chance for me with java to get a debugging view like in
eclipse for local apps also for a remote application.. with
breakpoints/breakpoints on exceptions and introspecting the state of
the objects ?

Christian
You have start the Java process (the one to be debugged) with some more
options. Instead of starting it with
java ...
you have to start it with
java -Xdebug -Xnoagent -Djava.compiler=NONE \
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=12345 ....
This will start your Java process as usual, but the JVM will also listen for
a debugger connection on port 12345.

In Eclipse you have to create a Debug configuration ("Remote Java
application") with the host name and the debug port number ("12345" from
the example above).
Later, when you want to debug the already running Java process, you have to
launch this Debug configuration.

You may also want to google for "Java remote debugging".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top