Giter Club home page Giter Club logo

laravel-debugbar's Introduction

Debugbar for Laravel

Unit Tests Packagist License Latest Stable Version Total Downloads Fruitcake

This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to the output. You can publish assets and configure it through Laravel. It bootstraps some Collectors to work with Laravel and implements a couple custom DataCollectors, specific for Laravel. It is configured to display Redirects and (jQuery) Ajax Requests. (Shown in a dropdown) Read the documentation for more configuration options.

Debugbar Dark Mode screenshot

Note: Use the DebugBar only in development. Do not use Debugbar on publicly accessible websites, as it will leak information from stored requests (by design). It can also slow the application down (because it has to gather data). So when experiencing slowness, try disabling some of the collectors.

This package includes some custom collectors:

  • QueryCollector: Show all queries, including binding + timing
  • RouteCollector: Show information about the current Route.
  • ViewCollector: Show the currently loaded views. (Optionally: display the shared data)
  • EventsCollector: Show all events
  • LaravelCollector: Show the Laravel version and Environment. (disabled by default)
  • SymfonyRequestCollector: replaces the RequestCollector with more information about the request/response
  • LogsCollector: Show the latest log entries from the storage logs. (disabled by default)
  • FilesCollector: Show the files that are included/required by PHP. (disabled by default)
  • ConfigCollector: Display the values from the config files. (disabled by default)
  • CacheCollector: Display all cache events. (disabled by default)

Bootstraps the following collectors for Laravel:

  • LogCollector: Show all Log messages
  • SymfonyMailCollector for Mail

And the default collectors:

  • PhpInfoCollector
  • MessagesCollector
  • TimeDataCollector (With Booting and Application timing)
  • MemoryCollector
  • ExceptionsCollector

It also provides a facade interface (Debugbar) for easy logging Messages, Exceptions and Time

Installation

Require this package with composer. It is recommended to only require the package for development.

composer require barryvdh/laravel-debugbar --dev

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

The Debugbar will be enabled when APP_DEBUG is true.

If you use a catch-all/fallback route, make sure you load the Debugbar ServiceProvider before your own App ServiceProviders.

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Barryvdh\Debugbar\ServiceProvider::class,

If you want to use the facade to log messages, add this to your facades in app.php:

'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,

The profiler is enabled by default, if you have APP_DEBUG=true. You can override that in the config (debugbar.enabled) or by setting DEBUGBAR_ENABLED in your .env. See more options in config/debugbar.php You can also set in your config if you want to include/exclude the vendor files also (FontAwesome, Highlight.js and jQuery). If you already use them in your site, set it to false. You can also only display the js or css vendors, by setting it to 'js' or 'css'. (Highlight.js requires both css + js, so set to true for syntax highlighting)

Copy the package config to your local config with the publish command:

php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"

Laravel with Octane:

Make sure to add LaravelDebugbar to your flush list in config/octane.php.

    'flush' => [
        \Barryvdh\Debugbar\LaravelDebugbar::class,
    ],

Lumen:

For Lumen, register a different Provider in bootstrap/app.php:

if (env('APP_DEBUG')) {
 $app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
}

To change the configuration, copy the file to your config folder and enable it:

$app->configure('debugbar');

Usage

You can now add messages using the Facade (when added), using the PSR-3 levels (debug, info, notice, warning, error, critical, alert, emergency):

Debugbar::info($object);
Debugbar::error('Error!');
Debugbar::warning('Watch out…');
Debugbar::addMessage('Another message', 'mylabel');

And start/stop timing:

Debugbar::startMeasure('render','Time for rendering');
Debugbar::stopMeasure('render');
Debugbar::addMeasure('now', LARAVEL_START, microtime(true));
Debugbar::measure('My long operation', function() {
    // Do something…
});

Or log exceptions:

try {
    throw new Exception('foobar');
} catch (Exception $e) {
    Debugbar::addThrowable($e);
}

There are also helper functions available for the most common calls:

// All arguments will be dumped as a debug message
debug($var1, $someString, $intValue, $object);

// `$collection->debug()` will return the collection and dump it as a debug message. Like `$collection->dump()`
collect([$var1, $someString])->debug();

start_measure('render','Time for rendering');
stop_measure('render');
add_measure('now', LARAVEL_START, microtime(true));
measure('My long operation', function() {
    // Do something…
});

If you want you can add your own DataCollectors, through the Container or the Facade:

Debugbar::addCollector(new DebugBar\DataCollector\MessagesCollector('my_messages'));
//Or via the App container:
$debugbar = App::make('debugbar');
$debugbar->addCollector(new DebugBar\DataCollector\MessagesCollector('my_messages'));

By default, the Debugbar is injected just before </body>. If you want to inject the Debugbar yourself, set the config option 'inject' to false and use the renderer yourself and follow http://phpdebugbar.com/docs/rendering.html

$renderer = Debugbar::getJavascriptRenderer();

Note: Not using the auto-inject, will disable the Request information, because that is added After the response. You can add the default_request datacollector in the config as alternative.

Enabling/Disabling on run time

You can enable or disable the debugbar during run time.

\Debugbar::enable();
\Debugbar::disable();

NB. Once enabled, the collectors are added (and could produce extra overhead), so if you want to use the debugbar in production, disable in the config and only enable when needed.

Storage

Debugbar remembers previous requests, which you can view using the Browse button on the right. This will only work if you enable debugbar.storage.open in the config. Make sure you only do this on local development, because otherwise other people will be able to view previous requests. In general, Debugbar should only be used locally or at least restricted by IP. It's possible to pass a callback, which will receive the Request object, so you can determine access to the OpenHandler storage.

Twig Integration

Laravel Debugbar comes with two Twig Extensions. These are tested with rcrowe/TwigBridge 0.6.x

Add the following extensions to your TwigBridge config/extensions.php (or register the extensions manually)

'Barryvdh\Debugbar\Twig\Extension\Debug',
'Barryvdh\Debugbar\Twig\Extension\Dump',
'Barryvdh\Debugbar\Twig\Extension\Stopwatch',

The Dump extension will replace the dump function to output variables using the DataFormatter. The Debug extension adds a debug() function which passes variables to the Message Collector, instead of showing it directly in the template. It dumps the arguments, or when empty; all context variables.

{{ debug() }}
{{ debug(user, categories) }}

The Stopwatch extension adds a stopwatch tag similar to the one in Symfony/Silex Twigbridge.

{% stopwatch "foo" %}
    …some things that gets timed
{% endstopwatch %}

laravel-debugbar's People

Contributors

anahkiasen avatar barryvdh avatar browner12 avatar d13r avatar decadence avatar deleugpn avatar ekvedaras avatar erikn69 avatar except10n avatar fletch3555 avatar fractalizer avatar grahamcampbell avatar jnoordsij avatar kamui545 avatar knvpk avatar laravel-debugbar avatar ltsochev-dev avatar luketowers avatar martindilling avatar nckrtl avatar papajoker avatar parallels999 avatar pataar avatar plapinski avatar reinink avatar sebdesign avatar sergiy-petrov avatar tristanmouchet avatar victord11 avatar yannik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-debugbar's Issues

Collecting events does not work with Laravel 4.1.x-dev

I added laravel-debugbar to an empty 4.1.x-dev laravel installation and tried to activate collecting events (publishing config, setting 'events' => true).

Problem: In 4.1.x-dev the event name isn't added to $payload variable in Illuminate\Events\Dispatcher::fire() method anymore. So your code to collect event names in Barryvdh\Debugbar\LaravelDebugbar::boot() doesn't work.

Debugbar and Bootstrap3 close button

I think there is an issue with the debugbar and twitter bootstrap3. As can be seen in the image, the FontAwsome close button is not displayed correctly. It does not matter if the scroll bar is present.

I tried it with the css and js vendor files set to true and false, both did not work. On a pc or laptop it is not such a problem, you still can manage to click the x, but on a tablet or phone it is more of a challenge.

capture_

Query params substitution

It would be great if this could automatically substitute the params for each query into the query string

FatalErrorException: Call to undefined method Barryvdh\Debugbar\Facade::warning()

Hi

After adding 'Debugbar' => 'Barryvdh\Debugbar\Facade' to the aliases array in app.php

I then try to execute one of my controller actions containing the following:

public function getIndex(){
Debugbar::warning('Watch out..');
}

But I receive the following error:

 Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to undefined method Barryvdh\Debugbar\Facade::warning()

Have I included the facade incorrectly?

Thanks a lot for you help.

Call to undefined method Illuminate\Session\Store::driver() under Laravel Framework version 4.0.7

Here is what's in the error log:

log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined method Illuminate\Session\Store::driver()' in .../vendor/barryvdh/laravel-debugbar/src/Barryvdh/Debugbar/LaravelDebugBar.php:253
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []

This is using Laravel Framework version 4.0.7 with cartalyst/sentry@39d0fdb (2013-09-24 10:01:22)

cartalyst/sentry:dev-master@57e8bac

Updating to laravel framework 4.0.9 and cartalyst/sentry@57e8bac (latest) gets rid of the error. However, updating either of them individually replaces this error with two different errors.

query durations

Thanks for great package.
Please add some more digits to database query results like 0.00256 ms.

also

Debugbar::measure('Two sql Queries', function() {
    $designs = Design::orderBy('id', 'DESC')->take(5)->get();
    $notices = Notice::orderBy('id', 'DESC')->take(5)->get();
});

"Two sql Queries (4ms)"

has to be more digits.

HTML escape database query parameter

Hey,

having trouble through some sql inserts of html content (html emails). The values of the parameter for database queries doesn't seem to be escaped and are breaking my and the laravels-debugbar layout. Not sure if this belongs to this package or the debugbar itself.

How to user Debugbar with API development?

Hi,

We are developing an API on Laravel. Thus we have different public folder than Laravel's public, and there we have built the front-end with AngularJS. Is it possible we could install assets to our Angular web application, and transmit Debugbar's data via API requests?

Composer Issue

Why do I get this error with laravel-debugbar's version and all minimum stability config

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for barryvdh/laravel-debugbar dev-master -> satisfiable by barryvdh/laravel-debugbar[dev-master].
    - barryvdh/laravel-debugbar dev-master requires maximebf/debugbar dev-master -> no matching package found.

Routes collector throwing an error

I get this exception with the routes collector enabled:

Argument 1 passed to Illuminate\Routing\Router::findPatternFilters() must be an instance of Symfony\Component\HttpFoundation\Request, string given, called in /var/www/scubaclick.com/vendor/barryvdh/laravel-debugbar/src/Barryvdh/Debugbar/DataCollector/SymfonyRouteCollector.php on line 88

Also, on the views collector, my view names overlap the dumped variables quite a bit on the first line (large app with some view files being 4 folders deep), making things basically unreadable. It'd be better if the dump would only start on the next line.

Problem with ajax requests

Hi,

When using the debugbar with ajax requests I always get an error where the browser returns a 'Request Failed' error. I found that if I comment out the following line in ServiceProvider.php it works again.

...
}elseif( $request->isXmlHttpRequest() ){
    $debugbar->sendDataInHeaders();
}elseif(
...

Would it be possible to make it optional whether or not to apply the debug data in the http headers for ajax requests?

Thanks

Tooltip typo

There is a little typo in the tooltip for Version.
Vresion instead of Version.

Can't see BeforeFilter() when using Route::resource with filters in __construct

Thanks, barryvdh.

I'm using your debugbar when developing my site. It's a nice piece of code and very handy.

But enough chitchat, here's the issue. I'm using a Controller and added it to my Routes.php like so:

Route::resource('dashboard/gebruikers', 'GebruikersController');

In the controller i have a __construct function like so:

public function __construct()
{
    $this->beforeFilter('dashboard');
    $this->beforeFilter('csrf', array('on' => array('put','post')));
}    

But now i don't see the BeforeFilter() in tab Route from the Debugbar. Please be aware that i refer to the first 'run' (if you could call it like that), the 'put' method, because it has to check the csrf-token.

I hope this helps making Debugbar an even better tool.

urlencode() expects parameter 1 to be string, array given

When using this package with my laravel 4.1-dev version and sentry 2 i get the following error.
urlencode() expects parameter 1 to be string, array given

It only happens when i try to log in with the remember me to true.

The backtrace on the error shows its trigger from

/vendor/barryvdh/laravel-debugbar/src/Barryvdh/Debugbar/ServiceProvider.php
Line 242: $debugbar->stackData();

I don't know if this is directly related to the debugbar but when i turn debugbar off it works fine.

EDIT

For the time being that laravel 4.1 is not released and/or sentry is not compatible i found a quick fix for my problem

Just before the redirect i do the following
\Config::set('laravel-debugbar::config.collectors.symfony_request',false);
And then do my redirect. This is only when a cookie has been set in app->after()

Database queries aren't showing if using different database connection than default

As the title says. If my Eloquent models specify a different database connection than the one specified in the default database parameter in /app/config/database.php the debugbar shows "Database 0" in the bar. If I change the default database connection to the one my Eloquent models are using then the debugbar will show the correct queries. Is there a way to get this to work with multiple databases as this is a very useful tool?

Error upon install re: reflection

I feel like a big idiot, but for the life of me I can't seem to get the debug-bar to work.

After I've installed it using composer, and immediately upon adding the serviceprovider to app.php, I get the following error both from the browser and artisan:

ReflectionException
Class files does not exist
open: /Users/jake/documents/workspace/evals/vendor/laravel/framework/src/Illuminate/Container/Container.php
    // hand back the results of the functions, which allows functions to be
    // used as resolvers for more fine-tuned resolution of these objects.
    if ($concrete instanceof Closure)
    {
        return $concrete($this, $parameters);
    }

    $reflector = new ReflectionClass($concrete);

    // If the type is not instantiable, the developer is attempting to resolve
{"error":{"type":"ReflectionException","message":"Class files does not exist","file":"\/Users\/jake\/documents\/workspace\/evals\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":308}}

Here are my composer require:

"require": {
        "laravel/framework": "4.0.10",
        "cartalyst/sentry": "2.0.*@dev",
        "barryvdh/laravel-ide-helper": "dev-master",
        "friendsofsymfony/oauth2-php": "1.0.*@dev",
        "guhelski/forecast-php": "dev-master",
        "maximebf/debugbar": ">=1.0.0",
        "barryvdh/laravel-debugbar": "dev-master",
        "rtablada/package-installer": "dev-master"
    },

Any suggestions?

I've completed removed my vendor folder, composer.lock files, ran composer dump-autoload, everything!

Debugbar and multitenancy: set DB::connection

I'm working on a multitenant website using the same approach as described here: http://forums.laravel.io/viewtopic.php?id=9315

Basically there's a tenant database that is queried first to get the tenant that is requested. Next the DB::connection is set to the correct tenant. The debugbur only picks up data from the the global tenants DB::connection, not from the tenant DB itself.

Is there a way to tell debugbar which connection to use?

@barryvdh: Sorry, posted this question first on the Laravel forums (http://forums.laravel.io/viewtopic.php?id=15381) before realizing it might be better to post here, so excuse me for the double post.

XHR requests and view collectors

We've just come up against a bug that has caused us a few hours of head scratching.

We're using PJAX (https://github.com/defunkt/jquery-pjax), which basically forces all requests to use ajax. In some cases, however, we found that the ajax response would fail, and the view would be rendered normally instead of via ajax.

We finally managed to track this down to using Chrome browser (FF works fine), and when the response has a large number of views, or those views have a large amount of data. We suspected that Chrome javascript engine has some kind of limit that is being exceeded.... and then we found http://stackoverflow.com/a/3436155 which confirmed this.

In production it is no problem at all, since debugbar is disabled, but it would be nice if we could get this working in dev. There are a few ways around this - maybe one option is to not collect view data if its an ajax request?

jQuery.noConflict

Please, remove this line from your generated (directly written in html) javascript code.
I causes very stupid errors and it took me over an hour to figure out whats the problem!
Because of this line, any other code can use $ as jQuery's accessor.

Show Laravel's Session

Hi,

It would be great if debugbar would have a section which shows information and the content of the Laravel's Session.

Using DebugBar only in local environment

I've a question and I can't figured it out.

I'm using, locally, your awesome debugbar and it works like a charm. But the problem comes when I publish, remotely, my project and the debugbar is still there.

Inside /boostrap/start.php I've

$env = $app->detectEnvironment(array(
    'local' => array('ludo.*','Ludo-MBPro.*'),
));

That allow me to use a /app/local/ folder for local configuration and it works fine for everythings. How can I enable debugbar to works only in local Env? Is there any kind of setup ? I can't spot it.

Edit: At the moment I've setup the ServiceProvider and the Alias inside the /app/local/app.php file. Is this the best way to handle it?

Couldn't close Debugbar when dragged all the way up

I dragged the Debugbar all the way up, so it filled up Firefox totally. I couldn't get it down again, though. I fixed it with the help of the Firefox developers tool by setting the height of the main DIV of the Debugbar to 80%, and dragged it down again myself.

Route collector error when changing locale

I have a fairly simple way of switching locales by adding the language code to the beginning of the route. Then in my global before filter, I just grab segment(1) and deal with locale switching as applicable. I am using Laravel 4 (laravel/framework (4.0.x-dev b78c92d)).

Unfortunately, when the route collector is set to true, I receive the following error:

ErrorException

Argument 2 passed to Barryvdh\Debugbar\DataCollector\SymfonyRouteCollector::getRouteInformation() must be an instance of Symfony\Component\Routing\Route, null given, called in C:\xampp\htdocs\myproject\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\DataCollector\SymfonyRouteCollector.php on line 24 and defined

My global before filter:

App::before(function($request)
{
    if ( in_array(Request::segment(1), Config::get('app.languages')) ) {
        Session::put('locale', Request::segment(1));
        return Redirect::to(substr(Request::path(), 3));
    }
    if ( Session::has('locale') ) {
        App::setLocale(Session::get('locale'));
    }
});

I have the latest update as per composer and the package is installed using dev-master.

This is how I'm setting up Debugbar in my project:

use DebugBar\StandardDebugBar;

$debugbar = new StandardDebugBar();
$debugbarRenderer = $debugbar->getJavascriptRenderer();
$pdo = new DebugBar\DataCollector\PDO\TraceablePDO(new PDO('mysql:host=localhost;dbname=db','user',''));
$debugbar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($pdo));

and in the html:

{{ $debugbarRenderer->renderHead() }}
{{ $debugbarRenderer->render() }}

Please let me know if you require any additional information.

Decoupling Jquery dependancy

Hi

first of id like to say im a huge fan of the package its really helped me with developing in laravel, I know this isnt really a issue but more of a feature request but I was wondering if you had perhaps thought about using vanilla javascript instead of having to rely on jquery?

The reason for suggesting this is that im currently working on a project thats using require.js and when i use this package im having a lot of issues on the javascript side of things due to the require.js handling all the loading.

removing the dependancy from jquery would in my mind be a great feature I know it would mean re-coding the whole js side.

Sorry if ive offended suggesting this.

thanks again for all the good work

Dan

Exception when uploading binary files

When using HTML form to upload binary file an exception is thrown in debugbar:

json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument

In \vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php

protected function getAddDatasetCode($requestId, $data, $suffix = null)
{
    $js = sprintf("%s.addDataSet(%s, \"%s\"%s);\n",
        $this->variableName,
        json_encode($data), //-------------> row 790

I assume this is used to display the POST data but it can't chew up the binary.

[enhancement] Ability to disable the debugbar per controller

Hi

Nice package for Laravel!

I have a controller where i don't want to show the debugbar at all, even not on the dev env.

I've tried to set Config::set('laravel-debugbar::config.enabled', false); in a controllers constructor. But the check happens in the boot() function which is called before a controller constructor.

So I've made a change on line 196 in the ServiceProvider.php file, from:

if( $app->runningInConsole()){
    return;
}

to this:

if( $app->runningInConsole() || !$app['config']->get('laravel-debugbar::config.enabled')){
    return;
}

Is this the easiest way to disable the debugbar per controller?

boot() function failure since upgrade to laravel 4.1 (blank screen, no errors)

Since I've upgraded to Laravel 4.1 I am getting a blank screen and no errors at all. Finally I went through every line of code and came to this package as point of failure.

Something seems to be wrong during the boot process at the moment of calling the boot() function of the service provider again on my server.

https://github.com/barryvdh/laravel-debugbar/blob/master/src/Barryvdh/Debugbar/ServiceProvider.php#L24

My Apache log also only says
[Thu Dec 26 13:40:36 2013] [notice] child pid 2909 exit signal Segmentation fault (11)

If you need any more information let me know. I have no more idea what I could do.

Readme issue

Hi just wondering if this is an issue or not

"post-update-cmd": [
    "php artisan ide-helper:generate",
    "php artisan debugbar:publish"
],

should the artisan command for the ide-helper be in there ive just helped a college out whos using your package and this seemed to be the issue.

[RuntimeException]
Error Output:
[InvalidArgumentException]
There are no commands defined in the "ide-helper" namespace.

When i removed that line it worked fine. I dont have your ide-helper package installed as I dont need it and looking at the debugbar package I cant see that it includes it in the install.

I hope ive got that right,

thanks

4.1.9 - doesnt seem to be loading the middleware.

I am using the Cartalyst Platform dev branch, which uses the latest laravel framework... so after looking at the service provider, altering this one bit did the trick...

    if(!defined('PLATFORM_VERSION') and version_compare($app::VERSION, '4.1', '>=')){
        $app->middleware('Barryvdh\Debugbar\Middleware', array($app));
    }else{
        $app->after(function ($request, $response) use($app)
        {
            $debugbar = $app['debugbar'];
            $debugbar->modifyResponse($request, $response);
        });
    }

Error With setRenderSqlWithParams

Call to undefined method DebugBar\DataCollector\PDO\PDOCollector::setRenderSqlWithParams()

Occurs in line 183 of src\Barryvdh\Debugbar\LaravelDebugBar.php.

Profiler Breaks on Laravel 4.1 upgrade

Running composer to update to the 4.1 branch of Laravel returns an error on the profiler:

{"error":{"type":"ErrorException","message":"Argument 1 passed to Barryvdh\\Debugbar\\SymfonyHttpDriver::__construct() must be an instance of Symfony\\Component\\HttpFoundation\\Session\\Session, instance of Illuminate\\Session\\Store given, called in C:\\root\\laravel4\\vendor\\barryvdh\\laravel-debugbar\\src\\Barryvdh\\Debugbar\\ServiceProvider.php on line 193 and defined","file":"C:\\root\\laravel4\\vendor\\barryvdh\\laravel-debugbar\\src\\Barryvdh\\Debugbar\\SymfonyHttpDriver.php","line":17}} Script php artisan optimize handling the post-update-cmd event returned with an error

[Bug] HTML not escaped with view data

This may be an upstream issue but it looks like the view data needs htmlentities before displaying the output. I am hoping to see the view data html but instead see this:

screen shot 2013-10-26 at 11 01 15 am

Viewing source outputs to:

screen shot 2013-10-26 at 11 01 41 am

Call to undefined method Illuminate\Session\Store::getFlashBag()

I just updated to the latest and straight away got this error.

Call to undefined method Illuminate\Session\Store::getFlashBag()
in
symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php:82

When i disable debugbar it all works fine!

running Laravel 4.1-dev

Allow Debugbar to be enabled during runtime

I need to enable debugbar based on a cookie, but it seems that only the disabling functionality is implemented.

App::before(function($request)
{
    /*
     * check debugbar cookie
     */
    if (Cookie::has('debugbar'))
    {
        Config::set('app.debug', true);

        Config::set('laravel-debugbar::config.enabled', true);
    }
});

the above code does not work.

Error publishing assets

I'm having trouble publishing the assets as described in the readme. I added debugbar to composer.json, updated it, and added it to the providers in app.php.

Running php artisan debugbar:publish gives me the following error:

[InvalidArgumentException]                                  
There are no commands defined in the "debugbar" namespace.

Allowed memory size exhausted after installation

Hi

At installation, after having published the assets successfully with php artisan debugbar:publish

I then try to refresh any page on my site and get

exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 679477248 bytes exhausted (tried to allocate 669253632 bytes)' 

I had increased my memory limit in php.ini from 512M to 648M to no avail.

Thanks.

Jon.

Exception Class 'session.store' does not exist when publishing assets under Laravel 4.0.7

The following exception is thrown when publishing assets under Laravel 4.0.7 with the 'debug' => true in app configuration:

$ php artisan debugbar:publish
public path: /app/public
{"error":{"type":"ReflectionException","message":"Class session.store does not exist","file":"\/app\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":296}}

The same exception is thrown when making requests via the web.

I have a patch that can fix this particular issue but I don't know if it is the best way to handle it or whether Laravel 4.0 is even on the support list for the debugbar. Will submit a pull request and you can decide if you want to keep it.

Generic css-class names causes problems

There are to many generic css class-names that makes that i cant use it and i bet more people will have the same issues. All class-classes needs to be prefixed.

Examples for none-prefixed classes:
active
list-item
key
value
toolbar
icon-search
status
sql
....

all these classes needs to be prefixed to avoid conflicts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.