If you don't want to recompile C source, you can start tomcat with these parameters and also attach remotely. (This is for 3.1.4 BTW)
C
Code:
/opt/zimbra/jdk1.5.0_06/bin/java -Xms303m -Xmx303m -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -client -XX:NewRatio=2 -Dcatalina.base=/opt/zimbra/apache-tomcat-5.5.15 -Dcatalina.home=/opt/zimbra/apache-tomcat-5.5.15 -Djava.io.tmpdir=/opt/zimbra/apache-tomcat-5.5.15/temp -Djava.library.path=/opt/zimbra/lib/jars -Djava.endorsed.dirs=/opt/zimbra/apache-tomcat-5.5.15/common/endorsed -classpath /opt/zimbra/apache-tomcat-5.5.15/bin/bootstrap.jar:/opt/zimbra/apache-tomcat-5.5.15/bin/commons-logging-api.jar org.apache.catalina.startup.Bootstrap start