- Notifications
You must be signed in to change notification settings - Fork0
Tracy Debugger support for Laravel
License
whipsterCZ/laravel-tracy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This service provider adds the powerfulTracy debug tool to the Laravel 5 framework.
Why is Tracy better than the laravel (Symfony) build-in debugger?
- Exception stack trace contains values of all method arguments.
- Request & Response & Server environment information is displayed on the error page.
- The whole error page with full stack trace can be easily stored to some directory as HTML file (useful on production mode).
- Webmaster can be notified by email about errors that occured on the site.
Seefull Tracy docs andsample error page.
Tracy is a part of theNette Framework.
- Tracy =2.3.7
- Laravel >5.1 = Choose repository tag matching your laravel version
- AddTracy to yourcomposer.json
"require": {"tracy/tracy":"2.3.7"}
- Add source code to your existing App - directories shouldmatch service Namespace
app/Services/Tracy/
- register service provider in yourconfig/app.php
'providers' => [...,App\Services\Tracy\ServiceProvider::class,]
This is it! No configuration needed.If you need configure Tracy or Laravel Exception handler @seeTracy/ServiceProvider.php
Tracy service automatically utilizeBugsnag error handling ifbugsnag-laravel
package is present
Service recognize application environment usingenv('APP_DEBUG')
IfAPP_DEBUG is false
orRequest()->ajax() is true
service log your Exceptions to directory
/storage/logs/
If you are sending JSON with TracyDebugBar rendered, you have probably created JSON Response wrong way.
Route::get('json',function(){$user = \App\Models\User::first();return$user;//Correct ->toJson() will be invoked and JSON Response will be created$json =$user->toJson();return$json;//Wrong - it creates Text/Plain Responsereturn \Response::json($json);//This is OK, but note that your JSON will be ESCAPED});
Use Tracy version 2.3.7 some newer versions are incompatible..
About
Tracy Debugger support for Laravel
Resources
License
Uh oh!
There was an error while loading.Please reload this page.