[commits] [Wiki] created: Doc/Dev/DebugH4

Michael Slusarz slusarz at horde.org
Wed Mar 23 17:43:18 UTC 2011


slusarz  Wed, 23 Mar 2011 17:43:18 +0000

Created page: http://wiki.horde.org/Doc/Dev/DebugH4

+ Debugging Tools For Horde 4

++ Horde::debug()  
[http://lists.horde.org/archives/dev/Week-of-Mon-20110321/025987.html]

To easily debug the value of a variable in Horde PHP code,  
Horde::debug() can be used.  Usage:

<code type="php">
Horde::debug($variable);
</code>

{{$variable}} is the variable you wish to debug.  The contents of this  
variable will be dumped into a file named {{horde_debug.txt}} in your  
temporary directory (generally set in {{horde/config/conf.php}} in the  
{{$conf['tmpdir']}} variable).

If you want to manually specify the location of the debug file, you  
can use the optional second parameter to Horde::debug():

<code type="php">
Horde::debug($variable, $filename);
</code>

{{$filename}} should be the full path to the filename.  If using  
{{$filename}}, make sure the directory/file is writable by the user  
the PHP process runs as.



More information about the commits mailing list