Skip to content

Instantly share code, notes, and snippets.

@d1i1m1o1n
Created February 19, 2016 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d1i1m1o1n/228d4aa03c6cb8ab6d9b to your computer and use it in GitHub Desktop.
Save d1i1m1o1n/228d4aa03c6cb8ab6d9b 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