Results 1 to 10 of 16

Thread: source level debugging

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    24
    Rep Power
    9

    Default source level debugging

    Hi I am getting myself familiar with the server now after spending 2 days building the latest from CVS and starting it up. I am just wondering how I should go about tracing through the code. I can't seem to start server/tomcat with -Xdebug ...etc.

    any hint is appreciated.

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Well you could run tomcat in eclipse(ie start it running under the debugger).
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Join Date
    Nov 2005
    Posts
    24
    Rep Power
    9

    Default

    you mean there is no way for me to start the server with remote debugging capability ? by no means I'd like to poke into propiatory secrets but is that how u guys debug by starting tomcat manually with some configuration to tell it where the zimbra stuff is at ? (as u can tell I am no tomcat expert)

  4. #4
    Join Date
    Sep 2005
    Posts
    274
    Rep Power
    10

    Default

    I don't run tomcat from inside eclipse, so I can't comment on that - others here do, and they may comment on that.

    wrt being able to use -Xdebug in the tomcat/jvm command line, you can do this by using zmlocalconfig to change tocmat_java_options (make sure you preserve current values and reuse them - there is no append in zmlocalconfig).

    Another thing to be aware of - if you are running production install, some JVM options are not allowed (for setuid/security reasons, -Xrun specifically being one of them; see source in ZimbraNative/src/launcher). Make sure you are using the "ZimbraServer/src/bin/tomcat" and not "tomcat.production" script to start/stop tomcat.

  5. #5
    Join Date
    Nov 2005
    Posts
    24
    Rep Power
    9

    Default

    ok, thanks for the info, I did the following:

    1. replaced ~zimbra/bin tomcat script with the "tomcat" script to make sure that I am not running the production script.
    2. added -Xdebug and others (with zmlocalconfig):
    tomcat_java_options = -client -XX:NewRatio=2 -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y ,suspend=n

    now the mailbox refuses to start, the status is always "stopped". did I miss something ?

  6. #6
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    10

    Default Running tomcat inside of eclipse

    Running it inside of eclipse is a huge help: you can change code on the fly (no restart), integrated debugging, etc.

    Many of the devs here use the sysdeo tomcat plugin:
    http://www.sysdeo.com/eclipse/tomcatplugin

    My configuration looks like this....it might not all be necessary, but this is what is running on my box:

    Windows/Preferences/Tomcat:
    Tomcat version: 5.x
    Tomcat home: \opt\zimbra\tomcat
    Configuration file: \opt\zimbra\tomcat\conf\server.xml

    Windows/Preferences/Tomcat/Advanced:
    Tomcat base: \opt\zimbra\tomcat
    Add Java Projects to classpath: ZimbraServer is checked

    Windows/Preferences/Tomcat/JVM Settings:
    add [ZimbraServerPath]\conf to the Classpath

    Windows/Preferences/Tomcat/Source Path:
    ZimbraServer is checked


    Note that there is a problem with the build.xml "deploy" task and the eclipse plugin: if you use the deploy task (or reset-the-world which calls deploy) you will need to stop and restart your server b/c of an issue with the SessionCache class not being properly reinitialized.

Similar Threads

  1. Installs but won't start on Linux FC6
    By iain in forum General Questions
    Replies: 6
    Last Post: 03-29-2007, 10:19 AM
  2. Replies: 0
    Last Post: 02-05-2007, 08:13 PM
  3. SSL Cert Problem using SOAP API
    By pbwebguy in forum Developers
    Replies: 1
    Last Post: 06-06-2006, 05:29 PM
  4. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 12:01 PM
  5. Zimbra on Debian?
    By omry_y in forum Installation
    Replies: 25
    Last Post: 11-04-2005, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •