Skip to content

Commit

Permalink
Merge pull request #62 from vinkla/debugger
Browse files Browse the repository at this point in the history
Add whoops debugger
  • Loading branch information
vinkla committed Apr 10, 2015
2 parents 7326f3c + be0ac22 commit cf18ca9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"wpackagist-plugin/tiny-compress-images": "~1.0",
"wpackagist-plugin/wp-sweep": "~1.0"
},
"require-dev": {
"fabpot/php-cs-fixer": "~2.0@dev",
"filp/whoops": "~1.0"
},
"extra": {
"installer-paths": {
"wp-content/plugins/{$name}": [
Expand Down
13 changes: 13 additions & 0 deletions wp-content/themes/boilerplate/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

return [

/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/

'debug' => getenv('APP_DEBUG'),

/*
|--------------------------------------------------------------------------
| GZIP
Expand Down
22 changes: 22 additions & 0 deletions wp-content/themes/boilerplate/library/modules/debug.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/*
* This file is part of WordPress Boilerplate.
*
* (c) Vincent Klaiber <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Whoops\Handler\PrettyPageHandler;
use Whoops\Run as Whoops;

/**
* Register the Whoops debug handler.
*/
if (config('app.debug', false)) {
$whoops = new Whoops;
$whoops->pushHandler(new PrettyPageHandler);
$whoops->register();
}

0 comments on commit cf18ca9

Please sign in to comment.