Jump to content

Turning on debugging at runtime: Difference between revisions

From NusaATK
m SmartDebug moved to Turning on debugging at runtime
No edit summary
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
How to use smart_debug?
{{Howto|Easy|Stootles}}
 
In addition to ATK's standard [[Debugging]] features, it has a sophisticated 'smart debug' feature that can selectively turn on/off debugging.


==Debugging for selected ip-addresses==
==Debugging for selected ip-addresses==
<pre>
<syntaxhighlight lang="php">
$config_smart_debug[] = array("type"=>"ip","list"=>array("195.168.0.10","195.168.0.11"));
$config_smart_debug[] = array("type"=>"ip","list"=>array("195.168.0.10","195.168.0.11"));
</pre>
</syntaxhighlight>
 
This will enabled debugging for the listed IP addresses.
This will enabled debugging for the listed IP addresses.


==Turn on debugging on the fly==
==Turn on debugging on the fly==


<pre>
<syntaxhighlight lang="php">
$config_smart_debug[] = array("type"=>"request", "key"=>"magicbeans");
$config_smart_debug[] = array("type"=>"request", "key"=>"magicbeans");
</pre>
</syntaxhighlight>


This will not show debugging info by default, unless someone adds &atkdebug[key]=magicbeans to the url. From that moment, debugging is enabled for the session.
This will not show debugging info by default, unless someone adds &atkdebug[key]=magicbeans to the url. From that moment, debugging is enabled for the session.


It's a kind of 'turn on debugging with a password' option.
It's a kind of 'turn on debugging with a password' option.
To change the debug level, just pass atkdebug[level]=x in the url, where x is a value between 0 (no debug) and 3 (full debug)

Latest revision as of 16:28, 12 February 2010

ATK Howto: Turning on debugging at runtime

Complexity: Easy
Author: Stootles

List of other Howto's

In addition to ATK's standard Debugging features, it has a sophisticated 'smart debug' feature that can selectively turn on/off debugging.

Debugging for selected ip-addresses

$config_smart_debug[] = array("type"=>"ip","list"=>array("195.168.0.10","195.168.0.11"));

This will enabled debugging for the listed IP addresses.

Turn on debugging on the fly

$config_smart_debug[] = array("type"=>"request", "key"=>"magicbeans");

This will not show debugging info by default, unless someone adds &atkdebug[key]=magicbeans to the url. From that moment, debugging is enabled for the session.

It's a kind of 'turn on debugging with a password' option.

To change the debug level, just pass atkdebug[level]=x in the url, where x is a value between 0 (no debug) and 3 (full debug)