Get expert guidance in a few days with a Laravel code review

Laravel Tracy

recca0120/laravel-tracy image

Laravel Tracy stats

Downloads
262.4K
Stars
383
Open Issues
3
Forks
44

View on GitHub →

A Laravel Package to integrate Nette Tracy Debugger

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

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

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Recca0120 Laravel Tracy Related Articles

RedBerry to Host Georgia's First Laravel Meetup in Tbilisi image

RedBerry to Host Georgia's First Laravel Meetup in Tbilisi

Read article
Build Custom Middleware for Query Performance Monitoring and Optimization in Laravel with MongoDB image

Build Custom Middleware for Query Performance Monitoring and Optimization in Laravel with MongoDB

Read article
Debugging production Laravel apps without losing your mind image

Debugging production Laravel apps without losing your mind

Read article
Laravel QuickBooks MCP Server: Connect QuickBooks Online to AI Clients image

Laravel QuickBooks MCP Server: Connect QuickBooks Online to AI Clients

Read article
ArtisanFlow: A Flowchart Engine for Laravel and Alpine.js image

ArtisanFlow: A Flowchart Engine for Laravel and Alpine.js

Read article
JSON Alexander Gives Developers a Simpler, More Trustworthy Way to View JSON in the Browser image

JSON Alexander Gives Developers a Simpler, More Trustworthy Way to View JSON in the Browser

Read article
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
Blastup logo

Blastup

Blastup provides social media enhancement services including buying Instagram likes, followers, and views, with features like instant delivery and a variety of packages to suit different needs.

Blastup
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media