Debug
Debug class for debugging Ajax-queries, cron files and for solutions of other similar tasks.
Similar classes in the old core:
AddMessage2Log,
mydump.
Example
When using print_r.
Debug::writeToFile($_SERVER); Debug::dump($_SERVER);
When using var_dump.
use Bitrix\Main\Diag\Debug; Debug::dumpToFile($_SERVER);
use Bitrix\Main\Diag\Debug; Debug::startTimeLabel("foo"); foo(); Debug::endTimeLabel("foo"); Debug::startTimeLabel("bar"); bar(); Debug::endTimeLabel("bar"); print_r(Debug::getTimeLabels());
© «Bitrix24», 2001-2024
Up