[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.webtools] Re: Debugging servlets (NEWBIE)

Manoj,

I'm able to debug Tomcat 4 by modifying startup.bat. These are the changes I made:

1. I added the following lines at the top:
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8788

2. I modified the line that runs catalina.bat to look like this:
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%

Then I could connect from Eclipse to the Tomcat VM on port 8788.

Hope it works for you too,
Dan


zwq00000 wrote:
Startup.bat called catalina.bat ,that is it's message.
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:       C:\Program Files\j2sdk_nb\j2sdk1.4.2
Usage:  catalina ( commands ... )
commands:
  debug             Start Catalina in a debugger
  debug -security   Debug Catalina with a security manager
  jpda start        Start Catalina under JPDA debugger
  run               Start Catalina in the current window
  run -security     Start in the current window with security manager
  start             Start Catalina in a separate window
  start -security   Start in a separate window with security manager
  stop              Stop Catalina


"Manoj" <manojbhardwaj@xxxxxxxxxxx> ??????:c2so8h$hs2$1@xxxxxxxxxxxxxx

Hi,

I want to debug my sevlets from within eclipse. I am using the following
environment:
JDK1.2.2
Eclipse 3.0 (but with JRE1.4)
Tomcat 3.2.1 (this is very OLD version of Tomcat)
WinNT 4

As such, I cannot use the fancy plugin tools available becuase they do not
support anything below Tomcat 3.3. I have done a lot of reading but that
has not helped me so far.

Can you guys please help me. I simply need to step strough my servlet
code. I have compiled my servlet with debug="on" using ANT. From the
Run>Debug>Remote Application I try to connect to localhost at port 8000
(also 9876 and 5000) but I always get "failed to connect to remote VM.
Connection refused." message.

I read somewhere that Tomcat needs to be started in debug mode too. But I
do not know how to do that. I start tomcat from the DOS command line
running the startup.bat script. As suggested at some websites, by adding a
few java options such -Xdebug, and a lot more, I should be able to start
Tomcat in debug mode (I have seen these options in many places so I trust
them to be OK). But I do not know how and where to place them in the batch
script. Also, when I do place them, Tomcat crashes with the Dr.Watson
message.

I need help. Please advice.