The Metadata Plugin
Metadata Management for Manila
 
Site last updated
2/24/2006; 12:33:21 PM
 
Home

Why

Features

FAQ

Updates

Documentation

Download

Developers

Bugs

Feedback

Discuss

Planned
Features

 
 

Debugging

The Metadata Plugin comes with a debugging system. This is particularly important to work around the lack of tracebacks given by Manila's mainResponder framework.

Logging is written to an outline at scratchpad.metadataDebuglog. Take care not to leave debugging on, as the outline can grow and grow.

To enable the debugging system, run metaDataSuite.debugging.enable. To disable it, run metaDataSuite.debugging.disable.

Essentially these scripts walk through the metadata macros and suite code, uncommenting or commenting debugging code. You'll see lots of windows flash by as this happens. Status is shown in the message box and summarized in a log outline.

You may wish to add debugging code of your own. In order to make your code function with the debugging system, please use the following format:

if flDebug
   metaDataSuite.utils.log(myname,"exiting because twix was not defined")

You will probably wish to use the metaDataSuite.utils.log script as in the above example, typically called using the myname parameter, as in this script:

Code Template: The code template.

The use of dialog.notify() for debugging is highly discouraged since it can stop servers.

Note that the log script checks for the existence of scratchpad.safeguard (automatically created and destroyed by debugging.enable and disable. This is so that if you accidentally move code with debugging in it to the server, the log outline will not bloat and drag your server into the quagmire.

Here's a screenshot of a typical trace. Here we've just posted metadata to a page:

Debugging trace screenshot: A debugging trace for the Metadata Plugin.

Comments...


This page last updated Wednesday, November 7, 2001 at 9:07:01 AM. (8110)