All Projects → kint-php → Kint

kint-php / Kint

Licence: mit
Kint - a powerful and modern PHP debugging tool.

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Labels

Projects that are alternatives of or similar to Kint

Pudb
Full-screen console debugger for Python
Stars: ✭ 2,267 (-12.2%)
Mutual labels:  debug
Laravel Migrate Fresh
An artisan command to build up a database from scratch
Stars: ✭ 179 (-93.07%)
Mutual labels:  debug
Icecream
🍦 Never use print() to debug again.
Stars: ✭ 5,601 (+116.92%)
Mutual labels:  debug
Redux Devtools Extension
Redux DevTools extension.
Stars: ✭ 13,236 (+412.63%)
Mutual labels:  debug
Ethereum Graph Debugger
Ethereum solidity graph plain debugger. To have the whole picture when debugging.
Stars: ✭ 177 (-93.14%)
Mutual labels:  debug
Logcat
Android 日志打印框架,在手机上可以直接看到 Logcat 日志啦
Stars: ✭ 189 (-92.68%)
Mutual labels:  debug
Ppk assert
PPK_ASSERT is a cross platform drop-in & self-contained C++ assertion library
Stars: ✭ 164 (-93.65%)
Mutual labels:  debug
Gulp Debug
Debug Vinyl file streams to see what files are run through your Gulp pipeline
Stars: ✭ 223 (-91.36%)
Mutual labels:  debug
Kinovision
Frame visualization utility for Unity
Stars: ✭ 177 (-93.14%)
Mutual labels:  debug
React Performance Observer
Get performance measurements from React Fiber
Stars: ✭ 207 (-91.98%)
Mutual labels:  debug
Godbg
Go implementation of the Rust `dbg` macro
Stars: ✭ 172 (-93.34%)
Mutual labels:  debug
Laravel Api Debugger
Easy debug for your JSON API.
Stars: ✭ 175 (-93.22%)
Mutual labels:  debug
The Front End Knowledge You May Not Know
😇 你可能不知道的前端知识点
Stars: ✭ 2,238 (-13.32%)
Mutual labels:  debug
Lightproxy
💎 Cross platform Web debugging proxy
Stars: ✭ 2,347 (-9.1%)
Mutual labels:  debug
Bugsnag Ruby
Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby
Stars: ✭ 211 (-91.83%)
Mutual labels:  debug
Hitchcock
The Master of Suspense 🍿
Stars: ✭ 167 (-93.53%)
Mutual labels:  debug
Acho
The Hackable Log
Stars: ✭ 189 (-92.68%)
Mutual labels:  debug
Icecream Cpp
🍦 Never use cout/printf to debug again
Stars: ✭ 225 (-91.29%)
Mutual labels:  debug
Iosdebugdatabase
make it easy to debug databases in iOS applications iOS debug database
Stars: ✭ 219 (-91.52%)
Mutual labels:  debug
Magicshader
🔮 Tiny helper for three.js to debug and write shaders
Stars: ✭ 205 (-92.06%)
Mutual labels:  debug

Kint - debugging helper for PHP developers

Screenshot

What am I looking at?

At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug_backtrace().

However, it's much, much more than that. You will eventually wonder how you developed without it.

Installation

One of the main goals of Kint is to be zero setup.

Download the file and simply

<?php

require 'kint.phar';

Or, if you use Composer:

composer require kint-php/kint --dev

Usage

<?php

Kint::dump($GLOBALS, $_SERVER); // pass any number of parameters
d($GLOBALS, $_SERVER); // or simply use d() as a shorthand

Kint::trace(); // Debug backtrace

s($GLOBALS); // Basic output mode

~d($GLOBALS); // Text only output mode

Kint::$enabled_mode = false; // Disable kint
d('Get off my lawn!'); // Debugs no longer have any effect

Tips & Tricks

  • Kint is enabled by default, set Kint::$enabled_mode = false; to turn it completely off.
    The best practice is to enable Kint in a development environment only - so even if you accidentally leave a dump in production, no one will know.
  • See the buttons on the right of the output? Click them to open a new tab, show the access path for the value, or show a search box.
  • To see the output where you called Kint instead of the docked toolbar at the bottom of the page add the line Kint\Renderer\RichRenderer::$folder = false; right after you include Kint.
  • There are a couple of real-time modifiers you can use:
    • ~d($var) this call will output in plain text format.
    • +d($var) will disregard depth level limits and output everything.
      Careful, this can hang your browser on large objects!
    • !d($var) will expand the output automatically.
    • -d($var) will attempt to ob_clean the previous output and flush after printing.
    • You can combine modifiers too: ~+d($var)
  • Double clicking the + sign will open/close it and all its children.
  • Triple clicking the + sign in will open/close everything on the page.
  • Add heavy classes to the blacklist to improve performance:
    Kint\Parser\BlacklistPlugin::$shallow_blacklist[] = 'Psr\Container\ContainerInterface';
  • To change display theme, use Kint\Renderer\RichRenderer::$theme = 'theme.css';. You can pass the absolute path to a CSS file, or use one of the built in themes:
    • original.css (default)
    • solarized.css
    • solarized-dark.css
    • aante-light.css
  • Kint has keyboard shortcuts! When Kint is visible, press D on the keyboard and you will be able to traverse the tree with arrows, HJKL, and TAB keys - and expand/collapse nodes with SPACE or ENTER.
  • You can write plugins and wrapper functions to customize dump behavior!
  • Read the full documentation for more information

Authors

Jonathan Vollebregt (jnvsor)
Rokas Šleinius (raveren)

License

Licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].