Results 1 to 5 of 5

Thread: Debugging Java Script

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    31
    Rep Power
    8

    Default Debugging Java Script

    Is there a recommended way to add debug lines to the JavaScript for debugging?? I am trying to build a zimlet to an external system and need to debug it.

    THanx Joe

  2. #2
    Join Date
    Jan 2007
    Posts
    31
    Rep Power
    8

    Default Debugging JavaScript

    I think I stumbled on the answer to this. In the Zimbra client add
    ?debug=1 to the URL and in the JavaScript Code add:

    DBG.println(AjxDebug.DBG1, "Hello World");

    When the client comes up, a separate window is displayed and shows the
    println statements. Make sure you turn off your pop-up blocker!!

    Thanx Joe

  3. #3
    Join Date
    Sep 2005
    Location
    Sunnyvale, CA
    Posts
    269
    Rep Power
    10

    Default

    Yep. Thats the way to do it. You can also bring up the debug window *after* the client has already been loaded by entering "$set:debug 1" (minus quotes) in the search field.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  4. #4
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    10

    Default

    Quote Originally Posted by jfavero View Post
    Is there a recommended way to add debug lines to the JavaScript for debugging?? I am trying to build a zimlet to an external system and need to debug it.

    THanx Joe
    Do yourself a favor, if you haven't already, go grab firebug for firefox. It gives you a ton of different ways to debug, without falling back to the old debug by printf ;-)

  5. #5
    Join Date
    Jan 2007
    Posts
    31
    Rep Power
    8

    Default

    Quote Originally Posted by lostknight View Post
    Do yourself a favor, if you haven't already, go grab firebug for firefox. It gives you a ton of different ways to debug, without falling back to the old debug by printf ;-)
    Yes, that is much easier ... thanx

Similar Threads

  1. Fedora 5: Could not create the Java virtual machine
    By mi2enno in forum Installation
    Replies: 6
    Last Post: 06-01-2007, 04:16 AM
  2. Tomcat, Java VM Problems - RAM related? Help
    By Mo_Hong in forum Administrators
    Replies: 3
    Last Post: 03-28-2007, 03:00 PM
  3. Mac OSX install: Java errors & LDAP CA error
    By jefbear in forum Installation
    Replies: 9
    Last Post: 12-16-2006, 03:39 PM
  4. Java 1.5 crashing on PPC Mac 10.4.8
    By bradn in forum Installation
    Replies: 1
    Last Post: 12-08-2006, 06:27 PM
  5. Replies: 0
    Last Post: 12-04-2005, 02:34 PM

Posting Permissions

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