Is your server(i.e tomcat or Jboss or whatever) running and listening
for debugging connections?

here is how I use Tomcat, JBoss and Eclipse to build and debug
applications.

Which ever platform you are using (tomcat or JBoss) you need to start
them with the JPDA debugging enabled. For tomcat this is very easy. In
the $CATALINA_HOME/bin directory there is a script catalina.sh. If you
provide the arguments 'jpda start' tomcat will startup and listen on
port 8000 for a debugger connection.

With JBoss its only slightly more complicated. Basically you need to
specify the JAVA_OPTS to have java start up listening for debugger
connections. I typically copy the $JBOSS_HOME/bin/run.sh to
$JBOSS_HOME/bin/run-debug.sh but you can just as easily setup the
JAVA_OPTS environment variable and use the run.sh script. 

The value of JAVA_OPTS needs have -Xdebug
-Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n specified.


here is the official info on the connection arguments:
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
Once you have JBoss or Tomcat running and listening for debugging
connections you are good to go for connectin with Eclipse. Ofcourse you
need have mention the same listen port in your 'debug launch
configuration'  of eclipse.

Hope this will help.

Chandra

-----Original Message-----
From: Shasirekha Engala [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 5:37 PM
To: user@struts.apache.org
Subject: Reg: debuging in eclipse

Hi

I have some problem related to eclipse. When I am trying to debug my
struts application I am getting the error as "Failed to connect to
remote VM".
Can I get solution to this problem.


Regards
Shasi



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to