Welcome, guest ( Login )

WikiHome » ApiRef Debugging

ApiRef Debugging

Version 1, changed by owen 10/30/2006.   Show version history

Instructions for debugging the ApiRef? tool at:   http://dojotoolkit.org/api    If you want more details on how things work, let me know.   -- Owen

There's a little "debug" menu on the top-right of the app.  Much of this assumes you are using FireBug on FireFox, so go ahead and install that (in a VM if you want) before continuing. I'll go down the entries in that menu one by one:

  • Toggle debug messages  -- turns logging on, for whatever I find significant at the moment.  Usually shows the app flow (loading the tree, loading individual module descriptions, "showItem" which is what outputs things on the right hand side).  This will be remembered in a cookie for the next time you reload.
  • Toggle profiling messages -- turns profiling messages on, really only useful if debugging is on.  This will show you how long significant things take to execute.  Probably not that useful unless you're working on the tool (or want to complain to me that "X" is too slow.  ;-)
  • Show Package -> Function Map -- this pretty prints the "function_names" file in the display area.  Use this to see why things are not showing up in the tree, as this is how I build up the tree.
  • Show Function -> Type Map -- this is an alphabetical dump of the results of my crawl through function_names building the tree.  The "type" field shows letters for what I've deduced about the objects:
"P" == package (what we've agreed to call "resource")

"M" == module (I'm not using this much anymore, don't worry about it)

"C" == something that looks to me like a "class" (eg: something with methods, that can be constructed with new())

"O" == something that looks to me like an "object" (something with methods, without a constructor)

"K" == has children

"F" == is a function that can be called directly

  • (Show Package->Function Map) w/o Functions -- same as above, but with items that are only "F" ommitted.  This should be the same structure as the tree.
  • Show All Known Functions -- alphabetical list of all of the names of functions defined in function_names.  Probably not that useful to you.
  • Show Parser Data for File... -- Pretty-prints the output for the parser-generated file for a top-level module (eg: "dojo-event" or "dojo.io" -- poorly defined when you choose a more specific item like "dojo.event.common.connect").  This is a dump of what is used to build the in-depth display on the right hand side.  When you select the menu item, it will ask you what you want to see, defaulting to the last item loaded (ish).
  • Show Parser Data for Reference... -- Pretty prints the "data" item that I have deduced from combining the parser file output (as above) with the tree structure I put together.  This is one place you can look at very specific items (eg: "dojo.event.common.connect").
  • Show Item for Reference... -- Really only useful with FireBug? on, this will output the item in the tree for a particular entry (eg: "dojo.event.common.connect").  You'll see "[Object object]" in FireBug? -- click on this to see details in the FireBug? inspector.  If an item is a "Class" or "Object", you'll see "methods" and "all" items -- these are what I use to actually output the display for that object.  This is probably the easiest way to see what's going on with an item that has been loaded.
  • Show ApiRef? To Do List -- Shows my to do list in a new window.

Attachments (0)

  File By Size Attached Ver.