Remote debugging a web app with Eclipse?

2004-11-14 Thread Michael Schuerig

I've tried to remote debug a web app with Eclipse, but didn't make the 
first hurdle. Apparently, Eclipse can't connect to Tomcat's JVM. I'm 
using Tomcat 5.5.1, J2SE 5.0 and Eclipse 3.1M3.

I take it, that in some way I need to tell the JVM that it's running in 
debug mode and what port it ought to listen on. All I found out, 
though, is that there's a deprecated -Xdebug option. Is there a short 
tutorial somewhere on remote debugging?

Michael

-- 
Michael Schuerig  Failures to use one's frontal lobes
mailto:[EMAIL PROTECTED]can result in the loss of them.
http://www.schuerig.de/michael/   --William H. Calvin

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



RE: Remote debugging a web app with Eclipse?

2004-11-14 Thread George Sexton
Here is a wrapper that I use to start tomcat for remote debugging with
Eclipse. Note that the indented CATALINA_OPTS is actually one long line in
the batch file.

REM @ECHO OFF
SET CATALINA_VER=5.0.28
SET CATALINA_BASE=M:\cdaily
SET CATALINA_HOME=C:\SERVLET\Jakarta-Tomcat-%CATALINA_VER%
SET CATALINA_OPTS=-Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7100 
-Djava.compiler=NONE 
-Dfile.encoding=ISO-8859-1
SET JAVA_HOME=C:\J2SDK1.4.2_04
%CATALINA_HOME%\bin\catalina.bat %1 %2 %3 %4 %5 %6 %7 %8 %9



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Michael Schuerig [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, November 14, 2004 9:06 AM
 To: [EMAIL PROTECTED]
 Subject: Remote debugging a web app with Eclipse?
 
 
 I've tried to remote debug a web app with Eclipse, but didn't 
 make the 
 first hurdle. Apparently, Eclipse can't connect to Tomcat's JVM. I'm 
 using Tomcat 5.5.1, J2SE 5.0 and Eclipse 3.1M3.
 
 I take it, that in some way I need to tell the JVM that it's 
 running in 
 debug mode and what port it ought to listen on. All I found out, 
 though, is that there's a deprecated -Xdebug option. Is there a short 
 tutorial somewhere on remote debugging?
 
 Michael
 
 -- 
 Michael Schuerig  Failures to use one's frontal lobes
 mailto:[EMAIL PROTECTED]can result in the loss of them.
 http://www.schuerig.de/michael/   --William H. Calvin
 
 -
 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]



Re: Remote debugging a web app with Eclipse?

2004-11-14 Thread Michael Schuerig
On Sunday 14 November 2004 17:16, George Sexton wrote:
 Here is a wrapper that I use to start tomcat for remote debugging
 with Eclipse. Note that the indented CATALINA_OPTS is actually one
 long line in the batch file.

Thanks! that was easier than I expected.

I'm starting Tomcat from an ant file like this:

  property name=tomcat.java_opts  value=-Duser.language=en 
-Dcom.sun.management.jmxremote -enableassertions -Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7100/

  target name=tomcat.start
   description=Start Tomcat server
exec executable=${tomcat.home}/bin/startup.sh 
  os=Linux,Unix
  env key=JAVA_OPTS value=${tomcat.java_opts}/
/exec
  /target

Michael

-- 
Michael Schuerig   Face reality and stare it down
mailto:[EMAIL PROTECTED]--Jethro Tull, Silver River Turning
http://www.schuerig.de/michael/

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