modX.setDebug
Last updated Apr 6th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodX::setDebug¶
Sets the debugging features of the modX instance.
Syntax¶
boolean|int setDebug ([boolean|int $debug = true])
-
$debug(boolean|int) Boolean or bitwise integer describing the debug state and/or PHP error reporting level. The strings'true','false','0','-1'and constant names such as'E_ALL'are accepted as well.
Returns the previous debug value, so the caller can restore it later.
Example¶
Turn debug mode on: log messages from LOG_LEVEL_DEBUG and enable full PHP error reporting.
$oldDebug = $modx->setDebug(true);
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










