{"id":37839,"date":"2015-07-28T18:05:31","date_gmt":"2015-07-28T18:05:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/kint-php-debugger\/"},"modified":"2019-03-11T17:29:04","modified_gmt":"2019-03-11T17:29:04","slug":"kint-php-debugger","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/kint-php-debugger\/","author":14410613,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.2","stable_tag":"2.0.2","tested":"5.1.22","requires":"3.5","requires_php":"5.3","requires_plugins":"","header_name":"Kint PHP Debugger","header_author":"hellofromTonya","header_description":"","assets_banners_color":"e1e8f0","last_updated":"2019-03-11 17:29:04","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/hellofromtonya.com","header_plugin_uri":"https:\/\/github.com\/KnowTheCode\/kint-php-debugger","header_author_uri":"https:\/\/KnowTheCode.io\/","rating":5,"author_block_rating":0,"active_installs":100,"downloads":13118,"num_ratings":12,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"12"},"assets_icons":[],"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"1439496","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.1.1","1.1.2","1.1.3","1.1.4","1.2.1","1.2.2","2.0.0","2.0.1","2.0.2"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"2048487","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2048487","resolution":"1","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"2048487","resolution":"3","location":"plugin"}},"screenshots":{"1":"An example of what gets rendered in the browser when using 'd( $var )'.","2":"Profile example from Kint.","3":"\"KINT ACTIVE\" indicator in the WordPress admin bar."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[94,22216,48478,23054,23055],"plugin_category":[59],"plugin_contributors":[82172],"plugin_business_model":[],"class_list":["post-37839","plugin","type-plugin","status-publish","hentry","plugin_tags-debug","plugin_tags-debugger","plugin_tags-kint","plugin_tags-print_r","plugin_tags-var_dump","plugin_category-utilities-and-tools","plugin_contributors-hellofromtonya","plugin_committers-hellofromtonya"],"banners":{"banner":"https:\/\/ps.w.org\/kint-php-debugger\/assets\/banner-772x250.jpg?rev=1439496","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/kint-php-debugger_e1e8f0.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/kint-php-debugger\/trunk\/screenshot-1.png?rev=2048487","caption":"An example of what gets rendered in the browser when using 'd( $var )'."},{"src":"https:\/\/ps.w.org\/kint-php-debugger\/trunk\/screenshot-2.png?rev=2048487","caption":"Profile example from Kint."},{"src":"https:\/\/ps.w.org\/kint-php-debugger\/trunk\/screenshot-3.png?rev=2048487","caption":"\"KINT ACTIVE\" indicator in the WordPress admin bar."}],"raw_content":"<!--section=description-->\n<p>This WordPress plugin is a wrapper for the <a href=\"https:\/\/kint-php.github.io\/kint\/\">Kint<\/a> PHP Debugger utility version 1.x.  Now instead of using var_dump() or print_r(), you simply use d() with zero, nadda, no formatting required.<\/p>\n\n<p>Use this tool when you are debugging your website, in place of <strong><a href=\"http:\/\/php.net\/manual\/en\/function.var-dump.php\">var_dump()<\/a><\/strong>, <strong><a href=\"http:\/\/php.net\/manual\/en\/function.print-r.php\">print_r()<\/a><\/strong> and <strong><a href=\"http:\/\/php.net\/manual\/en\/function.debug-backtrace.php\">debug_backtrace()<\/a><\/strong>.<\/p>\n\n<h4>Handy Tools<\/h4>\n\n<p>Some handy tools just for the PHP Developer:<\/p>\n\n<ul>\n<li><code>d( $var );<\/code> to render a collapsible UI container which displays your variable data in \"the most informative way\"<\/li>\n<li><code>ddd( $var );<\/code> same as d() except that it also executes <code>die()<\/code> to halt execution.<\/li>\n<\/ul>\n\n<p>Here are some variations of <code>d()<\/code> to give you the display you want:<\/p>\n\n<ul>\n<li><code>~d( $var );<\/code> outputs in plain text format.<\/li>\n<li><code>+d( $var );<\/code> disregards depth level limits and outputs everything<\/li>\n<li><code>!d( $var );<\/code> shows expanded rich output<\/li>\n<li><code>-d( $var );<\/code> attempts to ob_clean() the previous output (dump something inside of HTML)<\/li>\n<\/ul>\n\n<h4>Profiler<\/h4>\n\n<p>Kint even includes a na\u00efve profiler, which can help you analyze which blocks of code take longer than others:<\/p>\n\n<pre><code>Kint::dump( microtime() ); \/\/ just pass microtime()\nsleep( 1 );\nKint::dump( microtime(), 'after sleep(1)' );\nsleep( 2 );\nddd( microtime(), 'final call, after sleep(2)' );\n<\/code><\/pre>\n\n<p>See <a href=\"http:\/\/wordpress.org\/extend\/plugins\/kint-php-debugger\/screenshots\/\">screenshot 2<\/a> for what is rendered out in your browser.<\/p>\n\n<h3>Admin Bar<\/h3>\n\n<p>\"KINT ACTIVE\" indicator displays in the WordPress admin bar to alert you when the plugin is active.<\/p>\n\n<!--section=installation-->\n<h4>From your WordPress dashboard<\/h4>\n\n<ol>\n<li>Visit 'Plugins &gt; Add New'<\/li>\n<li>Search for 'Kint PHP Debugger'<\/li>\n<li>Activate Kint PHP Debugger from your Plugins page.<\/li>\n<\/ol>\n\n<h4>Once Activated<\/h4>\n\n<p>Whenever you want to dump out the data within a variable, simply use <code>d( $var )<\/code> to replace when you do pre + var_dump().<\/p>\n\n<p>To dump and die, you use <code>ddd( $var );<\/code>.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>How do I use this utility?<\/dt>\n<dd><p>When you are testing your code, you use d( $var ) in place of var_dump( $var ) and print_r( $var ).  No need to wrap it in pre's either.<\/p><\/dd>\n<dt>What does it render in the browser?<\/dt>\n<dd><p>Kint provides a handy UI that wraps up the data within the variable.  Click to open it up and see the data.<\/p>\n\n<p>See the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/kint-php-debugger\/screenshots\/\">screenshot 1<\/a> for an example.<\/p><\/dd>\n<dt>What else does Kint provide to help me debug?<\/dt>\n<dd><p>As you can see the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/kint-php-debugger\/screenshots\/\">screenshot 1<\/a>, besides the handy UI, it also provides you with a full call stack.  Click on the text below the UI to expand it out.<\/p><\/dd>\n<dt>Can I run this on a live site?<\/dt>\n<dd><p>I wouldn't unless you are testing.  This tool is for debug only.  Once you push the site live, deactivate and delete this plugin.<\/p><\/dd>\n<dt>What should I do when the site goes live?<\/dt>\n<dd><p>Deactivate and delete this plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>Version 2.0.2<\/h4>\n\n<ul>\n<li>Bump to sync versions.<\/li>\n<\/ul>\n\n<h4>Version 2.0.1<\/h4>\n\n<ul>\n<li>Removed changing the admin color palette to coffee.<\/li>\n<li>Removed changing the admin bar background color.<\/li>\n<\/ul>\n\n<h4>Version 2.0.0<\/h4>\n\n<ul>\n<li>Updated Kint version.<\/li>\n<li>Tested against WP 5.1<\/li>\n<\/ul>\n\n<h4>Version 1.2.1<\/h4>\n\n<ul>\n<li>Added \"KINT ACTIVE\" indicator to the WordPress admin bar to alert the plugin is activated.<\/li>\n<\/ul>\n\n<h4>Version 1.2.0<\/h4>\n\n<ul>\n<li>Excluded Composer files.<\/li>\n<li>Tested with WordPress 5.1.<\/li>\n<\/ul>\n\n<h4>Version 1.1.0 to 1.1.4<\/h4>\n\n<ul>\n<li>Changed to the kint-php package<\/li>\n<li>Upgraded Kint to v1.1<\/li>\n<\/ul>\n\n<h4>Version 1.0.1<\/h4>\n\n<ul>\n<li>Upgraded Kint to v1.0.10<\/li>\n<\/ul>\n\n<h4>Version 1.0.0<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"Kint is a modern and powerful PHP debugging helper, which requires zero-setup and replaces var_dump(), print_r() and debug_backtrace().","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/37839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=37839"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/hellofromtonya"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=37839"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=37839"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=37839"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=37839"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=37839"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=37839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}