- This topic has 2 replies, 1 voice, and was last updated 20 years, 2 months ago by choppc.
-
AuthorPosts
-
choppcMemberI have WinXP Pro SP1 with the following installed:
JDK v1.4.2-5
Tomcat v4.1.30
Eclipse v3.0.0
MyEclipse Enterprise Workbench v3.8.0I’m totally lost in figuring out how to get the Eclipse/MyEclipse environment configured to connect to an instance of Tomcat for debugging.
I am able to deploy [exploded form] to my local Tomcat installation and I can access my Struts-based webapp through Mozilla. I have my local installation of Tomcat manually started with the following options set to enable debugging [watch for wrapping]:
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
I also have Tomcat v4.1.x on a NetWare v6.5 server and on an OpenVMS Alpha v7.3-1 system.
I want to be able to set breakpoints in the Java classes that my webapp is based on and have MyEclipse connect to either the local instance of Tomcat or one of the remote instances of Tomcat to debug my webapp as it executes.
Is there a comprehensive tutorial that explains all of the fine details of setting up the remote debugging configuration?
choppcMemberI should also add that I’ve already gone into the menu Run -> Debug… and I’ve configured an entry for my project underr “Remote Java Application”. I have the host set to “localhost” and the port set to “8000” and the connection type is “Standard (Socket Attach)”. Under the “Common” tab I have the check box enabled for “Display in favorites menu” and I can see my project “Demo01” on the debug history list.
When I try to debug the project, I get the following error:
“Failed to connect to remote VM. Connection refused.”
I have confirmed that my Tomcat instance was already started with the following options:
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
choppcMemberNever mind…. I figured it out.
I’m not actually going insane.
It turns out that I had a stale environment variable “JAVE_HOME” that was causing the problem. After refreshing my command prompt window from which I was using the modified “startup.bat” file to start Tomcat I was able to get Eclipse to connect to my JVM. Apparently, the stale environment variable was causing Tomcat to start up with a different version of Java than what Eclipse was configured to use.
Now I can actually do my debugging.
-
AuthorPosts