Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 01-16-2007, 02:56 PM
Project Contributor
 
Posts: 31
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
Reply With Quote
  #2 (permalink)  
Old 01-17-2007, 11:20 AM
Project Contributor
 
Posts: 31
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
Reply With Quote
  #3 (permalink)  
Old 01-17-2007, 11:57 AM
Zimbra Employee
 
Posts: 267
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!
Reply With Quote
  #4 (permalink)  
Old 01-23-2007, 06:16 PM
Zimlet Guru & Moderator
 
Posts: 431
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 ;-)
Reply With Quote
  #5 (permalink)  
Old 01-25-2007, 11:42 AM
Project Contributor
 
Posts: 31
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
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0