Home

Awesome

Tracy Debugger support for Laravel

This service provider adds the powerful Tracy debug tool to the Laravel 5 framework.

Nette Tracy screenshot

Why is Tracy better than the laravel (Symfony) build-in debugger?

See full Tracy docs and sample error page.

Tracy is a part of the Nette Framework.

Requirements

Installation

  1. Add Tracy to your composer.json
"require": {
    "tracy/tracy": "2.3.7"
}
  1. Add source code to your existing App - directories should match service Namespace
app/Services/Tracy/
  1. register service provider in your config/app.php
'providers' => [
	...,
	App\Services\Tracy\ServiceProvider::class,
]

Configuration

This is it! No configuration needed. If you need configure Tracy or Laravel Exception handler @see Tracy/ServiceProvider.php

Bugsnag integration

Tracy service automatically utilize Bugsnag error handling if bugsnag-laravel package is present

Logging

Service recognize application environment using env('APP_DEBUG')

If APP_DEBUG is false or Request()->ajax() is true service log your Exceptions to directory

/storage/logs/

TroubleShooting

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 Response
	
	return \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..