44
55use Bitrix \Main \Loader ;
66
7+ $ ggrachDebuggerRootPath = str_replace ($ _SERVER ['DOCUMENT_ROOT ' ], '' , __DIR__ );
8+
79Loader::registerAutoLoadClasses (null , [
8- "\GGrach\BitrixDebugger\Debugger\Debugger " => __DIR__ . "/src/BitrixDebugger/Debugger/Debugger.php " ,
9- "\GGrach\BitrixDebugger\Debugger\DebuggerShowModable " => __DIR__ . "/src/BitrixDebugger/Debugger/DebuggerShowModable.php " ,
10- "\GGrach\BitrixDebugger\Contract\ShowModableContract " => __DIR__ . "/src/BitrixDebugger/Contract/ShowModableContract.php " ,
11- "\GGrach\BitrixDebugger\Configurator\DebuggerConfigurator " => __DIR__ . "/src/BitrixDebugger/Configurator/DebuggerConfigurator.php " ,
12- "\GGrach\BitrixDebugger\Configurator\DebugBarConfigurator " => __DIR__ . "/src/BitrixDebugger/Configurator/DebugBarConfigurator.php " ,
13- "\GGrach\BitrixDebugger\Cache\RuntimeCache " => __DIR__ . "/src/BitrixDebugger/Cache/RuntimeCache.php " ,
14- "\GGrach\BitrixDebugger\Validator\ShowModeDebuggerValidator " => __DIR__ . "/src/BitrixDebugger/Validator/ShowModeDebuggerValidator.php " ,
15- "\GGrach\Writer\FileWriter " => __DIR__ . "/src/Writer/FileWriter.php " ,
16- "\GGrach\Writer\Contract\WritableContract " => __DIR__ . "/src/Writer/Contract/WritableContract.php "
10+ "\GGrach\BitrixDebugger\Debugger\Debugger " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Debugger/Debugger.php " ,
11+ "\GGrach\BitrixDebugger\Debugger\DebuggerShowModable " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Debugger/DebuggerShowModable.php " ,
12+ "\GGrach\BitrixDebugger\Contract\ShowModableContract " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Contract/ShowModableContract.php " ,
13+ "\GGrach\BitrixDebugger\Configurator\DebuggerConfigurator " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Configurator/DebuggerConfigurator.php " ,
14+ "\GGrach\BitrixDebugger\Configurator\DebugBarConfigurator " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Configurator/DebugBarConfigurator.php " ,
15+ "\GGrach\BitrixDebugger\Cache\RuntimeCache " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Cache/RuntimeCache.php " ,
16+ "\GGrach\BitrixDebugger\Validator\ShowModeDebuggerValidator " => $ ggrachDebuggerRootPath . "/src/BitrixDebugger/Validator/ShowModeDebuggerValidator.php " ,
17+ "\GGrach\Writer\FileWriter " => $ ggrachDebuggerRootPath . "/src/Writer/FileWriter.php " ,
18+ "\GGrach\Writer\Contract\WritableContract " => $ ggrachDebuggerRootPath . "/src/Writer/Contract/WritableContract.php "
1719]);
1820
1921$ ggrachDebuggerConfigurator = new \GGrach \BitrixDebugger \Configurator \DebuggerConfigurator ();
2426$ ggrachDebuggerConfigurator ->setLogPath ('success ' , __DIR__ . '/logs/success.log ' );
2527$ ggrachDebuggerConfigurator ->setLogPath ('notice ' , __DIR__ . '/logs/notice.log ' );
2628
29+ /*
30+ * code - отображать дебаг-данные в коде
31+ * debug_bar - отображать дебаг-данные в debug_bar
32+ * log - отображать дебаг-данные в логе
33+ */
34+ $ ggrachDebuggerConfigurator ->setShowModes (['code ' , 'debug_bar ' , 'log ' ]);
35+
2736global $ GD ;
2837$ GD = new \GGrach \BitrixDebugger \Debugger \Debugger ($ ggrachDebuggerConfigurator , $ ggrachDebugBarConfigurator );
2938
30- include 'inizializer_alias.php ' ;
39+ include 'inizializer_alias.php ' ;
0 commit comments