home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 June / PersonalComputerWorld-June2009-CoverdiscCD.iso / Software / Freeware / Firebug 1.3.3 / firebug-1.3.3-fx.xpi / content / firebug / trace.js < prev    next >
Encoding:
JavaScript  |  2009-02-19  |  968 b   |  26 lines

  1. /* See license.txt for terms of usage */
  2.  
  3. // Our global trace object.
  4.  
  5. var FBTrace = Components.classes["@joehewitt.com/firebug-trace-service;1"]
  6.                  .getService(Components.interfaces.nsISupports).wrappedJSObject.getTracer("extensions.firebug");
  7.  
  8. // ************************************************************************************************
  9. // Some examples of tracing APIs
  10.  
  11. // 1) Log "Hello World!" into the console.
  12. //    FBTrace.sysout("Hello World!")       
  13. //
  14. // 2) Log "Hello World!" if the DBG_ERROR option is true.
  15. //    if (FBTrace.DBG_ERROR)
  16. //       FBTrace.sysout("Hello World!");  
  17. //
  18. // 3) Log "Hello World!" and various info about 'world' object.
  19. //    FBTrace.sysout("Hello World!", world);  
  20. //
  21. // 4) Log into specific console (created by Firebug extension).
  22. //    FBTrace.dump("firebug.extensions", "Hello World!", world);
  23. //    FBTrace.dump("chromebug.extensions", "Hello World!", world);
  24. //
  25. // TODO: how to open another console.
  26.