Skip to content

Instantly share code, notes, and snippets.

@leviwheatcroft
Created May 31, 2014 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leviwheatcroft/8029f587f62a9e81b150 to your computer and use it in GitHub Desktop.
Save leviwheatcroft/8029f587f62a9e81b150 to your computer and use it in GitHub Desktop.
Debug like a pro with Kint! It seems odd to me that Kint doesn't do this automagically. Maybe it's also odd that I've been using Kint for months and only just figured out that this is what I should be doing.
define('__ROOT__',dirname(__FILE__));
require_once __ROOT__ . '/lib/kint/Kint.class.php';
function kint_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
Kint::dump(func_get_args());
Kint::trace();
die();
}
set_error_handler('kint_error_handler');
trigger_error('pfft..');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment