recca0120/laravel-tracy
Composer 安装命令:
composer require recca0120/laravel-tracy
包简介
A Laravel Package to integrate Nette Tracy Debugger
README 文档
README
Nette Tracy for Laravel 5
Better Laravel Exception Handler
Features
- Visualization of errors and exceptions
- Debugger Bar (ajax support @v1.5.6)
- Exception stack trace contains values of all method arguments.
Online Demo
Installing
To get the latest version of Laravel Exceptions, simply require the project using Composer:
composer require recca0120/laravel-tracy --dev
Instead, you may of course manually update your require block and run composer update if you so choose:
{
"require-dev": {
"recca0120/laravel-tracy": "^1.8.14"
}
}
Include the service provider within config/app.php. The service povider is needed for the generator artisan command.
'providers' => [ ... Recca0120\LaravelTracy\LaravelTracyServiceProvider::class, ... ];
publish
php artisan vendor:publish --provider="Recca0120\LaravelTracy\LaravelTracyServiceProvider"
if you see Route [tracy.bar] not defined. pleace run artisan route:clear once
artisan route:clear
Config
return [ 'enabled' => env('APP_DEBUG') === true, 'showBar' => env('APP_ENV') !== 'production', 'accepts' => [ 'text/html', ], // appendTo: body | html 'appendTo' => 'body', 'editor' => 'subl://open?url=file://%file&line=%line', 'maxDepth' => 4, 'maxLength' => 1000, 'scream' => true, 'showLocation' => true, 'strictMode' => true, 'panels' => [ 'routing' => true, 'database' => true, 'model' => true, 'view' => true, 'event' => false, 'session' => true, 'request' => true, 'auth' => true, 'html-validator' => true, 'terminal' => true, ], ];
Editor Link
windows
copy <vendor path>/recca0120/laravel-tracy/tools/subl-handler/subl-handler.vbs to any directory where you want to place
double click subl-handler.vbs and select editor (support eclipse, sublime, notepad++, else...)
If you use Vagrant and have issues with the incorrect path being called, you can create a symlink as illustrated at: https://prnt.sc/lpswki
OSX
https://github.com/dhoulb/subl
Prefer PhpStorm, you can edit config/tracy.php's key of editor like this:
'editor' => 'phpstorm://open?file=%file&line=%line',
Debugger Bar
Directive bdump
Ajax Debugger Bar
SystemInfo
Route
View
Session
Request
Auth
Custom Auth
// app/Providers/AppServiceProvider.php
namespace App\Providers;
use Recca0120\LaravelTracy\BarManager;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function boot(BarManager $barManager)
{
$barManager->get('auth')->setUserResolver(function() {
return [
'id' => 'xxx',
'username' => 'xxx',
...
];
});
}
}
Html Validator
Web Artisan
web artisan is another package recca0120/terminal
notice
if you install terminal before, this panel will throw errors, please remove folder app/resources/views/vendor/terminal
STANDALONE
require __DIR__.'/../vendor/autoload.php'; use Recca0120\LaravelTracy\Tracy; // before outout $tracy = Tracy::instance(); $authPanel = $tracy->getPanel('auth'); $authPanel->setUserResolver(function() { return [ 'email' => 'recca0120@gmail.com' ]; }); function sql($sql) { $tracy = Tracy::instance(); $databasePanel = $tracy->getPanel('database'); $databasePanel->logQuery($sql); } sql('select * from users'); sql('select * from news'); sql('select * from products');
Thanks
recca0120/laravel-tracy 适用场景与选型建议
recca0120/laravel-tracy 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 284.45k 次下载、GitHub Stars 达 382, 最近一次更新时间为 2015 年 08 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「debug」 「error handler」 「error」 「profiler」 「nette」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 recca0120/laravel-tracy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 recca0120/laravel-tracy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 recca0120/laravel-tracy 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Lazy loading for middleware and request handlers
Debug your SimpleBus EventBus and CommandBus
nice output for debug functions for PHP 5.3
Set Links with a specific language parameter
Bootstraps errors and handles them via reporters and renderers
Analysis module for finding problematical shop data.
统计信息
- 总下载量: 284.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 388
- 点击次数: 41
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-13
