Skip to content

Instantly share code, notes, and snippets.

@nook-ru
Created February 19, 2016 12:48
Show Gist options
  • Save nook-ru/87a63dfc4e6a279f5d1d to your computer and use it in GitHub Desktop.
Save nook-ru/87a63dfc4e6a279f5d1d to your computer and use it in GitHub Desktop.
Bitrix(d7). Debug
<?php
use Bitrix\Main\Diag\Debug;
use Bitrix\Main\Diag\Helper;
/*Write in file*/
//Debug::writeToFile($variable, $varName, $file);
Debug::writeToFile(['ID' => $ID, 'fields' => $arResult ], null, "log.log");
Debug::dumpToFile(['ID' => $ID, 'fields' => $arResult ], null, "log.log");
/*Time label*/
Debug::startTimeLabel('brand_list');
//get brand list
Debug::endTimeLabel('brand_list');
//Show time label
Debug::getTimeLabels();
/*Helpers*/
Helper::getCurrentMicrotime();
Helper::getBackTrace($limit = 0, $options = null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment