If you're writing plugins and you need a place to do some debug printing, the easiest thing to do is to toss a "$debugprint" variable in your foot.html file (or whatever flavour file you want to toss it in). Then every time you want to print a debug statement, do something like this:
request = args["request"]
data = request.getData()
debugprint = data.get("debugprint", "")
data["debugprint"] = debugprint + "\nyour print statement here"
The neat thing about this is that you can leave the $debugprint in your flavour template file when you're done. If the variable is not defined or it doesn't have any data, it gets removed.
changelog
Please keep comments appropriate. I reserve the right to remove anonymous comments, flames, spammy, inappropriate, and other comments that I deem to be worth removing.
Note: New comments get placed in a "draft" status and will NOT show up on the site until I explicitly approve it. Usually that happens within 24 hours, but sometimes I go away and it takes a day or two.
Note 2: There is now a preview button for those of you who want to see a preview! However, it doesn't quite work the way you'd think it should work. I'll look into adjusting it some day.
Note 3: If you can't for some reason post a comment, send me an email: willg at bluesock dot org.
All contents Copyright 1996 to 2008 Will Guaraldi.
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.