BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing gives surprizing power in the tiniest of footprints.

Our software is ideal for creating complex, interactive, web applications fast...


Documentation > Tutorials > Debugging

Writing new code can be a challenge some times. Fortunately, BoltWire has a couple built-in tools to help with debugging.

Error Reporting
Set "$errorReporting = 'true';" in index.php before calling the engine to turn on PHP's error messages. If you want to limit who can see these messages, try doing something like this:

if ($_SESSION['field']['ID']['id'] == 'admin') $errorReporting = 'true';

Set $debug = 'true'; in index.php (or config.php) to bypass BoltWire's normal output method, which buffers the output and sends it back devoid of any print messages BoltWire might generate. In other words, if you don't do this and put print_r($check); in your plugin--you won't see the message. Turn it on, and the message will appear.

Note: This turns off automatic indexing, so don't forget to remove this line when finished.

P and PP
There's a couple quick utilities in engine.php to simplify sending error messages back to the browser.

p('some text'); turns debugging mode on and prints the message without stopping page processing.

pp('some text'); prints the message and aborts page processing immediately.

These won't solve all your programming problems, but hopefully they can help a bit!