AnsweredAssumed Answered

Debugging Alfresco Tomcat with Eclipse

Question asked by robertmarkbram on May 28, 2010
Latest reply on May 31, 2010 by robertmarkbram
Hi All,

I am trying to debug Alfresco with Eclipse and have tried all of the various solutions I have found on this forum to no avail thus far. I am hoping someone can advise me as to what else to try..

JPDA_TRANSPORT environment variable is set to dt_socket.

JPDA_ADDRESS environment variable is set to 8000.

In Tomcat's startup script (C:\Alfresco\tomcat\bin\startup.bat), changed the line that invokes Catalina to include jpda:
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%

I start Tomcat and see these messages:
Listening for transport dt_socket at address: 8000
28/05/2010 1:44:42 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080

I set up Eclipse debug config as per: [img][/img]

I get this error from Eclipse: [img][/img]

Error detail:
   java.vendor=Sun Microsystems Inc.
   BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU
   Framework arguments:  -product com.springsource.sts.ide
   Command-line arguments:  -os win32 -ws win32 -arch x86 -product com.springsource.sts.ide -clean -data D:\work\projects\JadeLynx\Alfresco-3.3

   Fri May 28 14:55:37 EST 2010
   Failed to connect to remote VM. Connection refused. Connection refused: connect
      at Method)
      at org.eclipse.jdi.internal.connect.SocketTransportService$

I made sure Windows firewall was turned off.

I made sure Eclipse has no proxy information.

I did a "netstat -an | grep -i listen" to confirm port is being listened at. I guess it is:
   TCP               LISTENING

Tried advice in this thread:
1)   Open Catalina.bat [C:\Alfresco\tomcat\bin], find “DEBUG_OPTS=” and add following line..
   set DEBUG_OPTS= -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Tried advice in this thread:
You may also add following line to your and start the server
   export JAVA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y'

How do I prove the server is really listening? Any other ideas would be more than welcome!