Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / March 2005

Tip: Looking for answers? Try searching our database.

eclipse won't debug remotly

Thread view: 
Elhanan - 27 Mar 2005 21:56 GMT
hi..

i have java 1.4.2.06  and eclipse 3.0.1

when i try to remote debug a program, although it waits for eclipse it
simply continues to the end without stopping on any breakpoints when i
start eclipse debug.
Alex Molochnikov - 28 Mar 2005 07:49 GMT
Of course, you realize that in order to be remotely debugged, your JVM must
be instrumented by setting certain parameters in the command line.

How do you start your remote program? In order to get help, you will have to
show the full command line. Is it GUI-based, or a headless process?

> hi..
>
[quoted text clipped - 3 lines]
> simply continues to the end without stopping on any breakpoints when i
> start eclipse debug.
Elhanan - 28 Mar 2005 20:47 GMT
off course here it is:
java -classpath RemoteExample.jar -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-Djava.compiler=NONE
com.ibm.jdg2e.usingjdt.remotedebugging.RemoteDebuggingExample 20

taken right out of Eclipse Developer Guide.

> Of course, you realize that in order to be remotely debugged, your JVM must
> be instrumented by setting certain parameters in the command line.
[quoted text clipped - 9 lines]
> > simply continues to the end without stopping on any breakpoints when i
> > start eclipse debug.
Alex Molochnikov - 28 Mar 2005 23:17 GMT
Have you tried setting suspend=n? If this is a GUI-based program, and the
break is located in the main event loop, this should not be a problem. If
your program is a headless start-and-end process, you may want to put in a
delayer loop, like

try { Thread.currentThread().sleep(10000); }
catch (Exception e) {}

early in the program, which should give you enough time to connect the
debugger to it.

For the background Java processes, I use this approach, and it always worked
for me.

> off course here it is:
> java -classpath RemoteExample.jar -Xdebug -Xnoagent
[quoted text clipped - 21 lines]
> when i
> > > start eclipse debug.
Elhanan - 29 Mar 2005 06:55 GMT
well i tried using suspend=n but it simply runs to program from that to
finish not waiting for the debugger (as opposed to before when it
waited for the debugger but when i started ecplise it released it)

it's not a gui program but just a simply console one, it seems that the
breakpoints themselves don't work in remote debugging.
Alex Molochnikov - 29 Mar 2005 09:11 GMT
Just to be sure, in the Debug panel, you have:

selected the Remote Java Application (in the left frame);
in the right frame, set the project name, and the correct connection
properties (e.g. localhost, port 8000);
in the Source tab (also in the right frame), set the correct source path.

If all of the above settings are in place, the debug should stop at the
breakpoints. If it still does not, you may want to take your inquiry to the
Eclipse forum.

> well i tried using suspend=n but it simply runs to program from that to
> finish not waiting for the debugger (as opposed to before when it
> waited for the debugger but when i started ecplise it released it)
>
> it's not a gui program but just a simply console one, it seems that the
> breakpoints themselves don't work in remote debugging.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.