n0nag0n/fatfree-tracy-extensions
最新稳定版本:v0.3.0
Composer 安装命令:
composer require n0nag0n/fatfree-tracy-extensions
包简介
A few Fat-Free specific extensions for Tracy Debugger to help debug your code quickly.
README 文档
README
This is a set of extensions to make working with Fat-Free a little richer.
- F3 - Analyze all hive variables.
- Database - Analyze all queries that have run on the page
- Request - Analyze all
$_SERVERvariables and examine all global payloads ($_GET,$_POST,$_FILES) - Session - Analyze all
$_SESSIONvariables
Installation
Run composer require n0nag0n/fatfree-tracy-extensions --dev and you're on your way!
Configuration
There is very little configuration you need to do to get this started. You will need to initiate the Tracy debugger prior to using this https://tracy.nette.org/en/guide:
<?php use Tracy\Debugger; use n0nag0n\Tracy_Extension_Loader; // bootstrap code $f3 = Base::instance(); Debugger::enable(); // You may need to specify your environment with Debugger::enable(Debugger::DEVELOPMENT) // Database query profiler (not required) // Create DB connection // Variant 1 $f3->set('DB', new DB\SQL('mysql:host=localhost;port=3306;dbname=database', 'username', 'password')); // OR variant 2 $f3->set('AnyVariableName', new DB\SQL('mysql:host=localhost;port=3306;dbname=database', 'username', 'password')); // OR variant 3 $my_db_connection = new DB\SQL('mysql:host=localhost;port=3306;dbname=database', 'username', 'password'); $extension_options = [ // Variant 2: Specify the name of the variable F3 with database connection 'database_variable_name' => 'AnyVariableName', //It will mean: $f3->get('AnyVariableName') // OR variant 3: pass the database connection object 'database_object' => $my_db_connection ]; new Tracy_Extension_Loader($f3, $extension_options); // If you have no database connection or your connection is written in $f3->set('DB') (variant 1), // you don't need to create $extension_options because the name 'DB' is used by default, simple: // new Tracy_Extension_Loader($f3); // more code $f3->run();
统计信息
- 总下载量: 228
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-15