{"id":117562,"date":"2020-02-25T09:39:44","date_gmt":"2020-02-25T09:39:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/kl-debug\/"},"modified":"2022-06-24T07:18:24","modified_gmt":"2022-06-24T07:18:24","slug":"kl-debug","status":"publish","type":"plugin","link":"https:\/\/lmo.wordpress.org\/plugins\/kl-debug\/","author":16869511,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.5","stable_tag":"1.0.5","tested":"6.0.11","requires":"5.2","requires_php":"7.2","requires_plugins":"","header_name":"KL Debug","header_author":"Krea'Lab","header_description":"Add a Debug Bar to your Wordpress website to debug and develop your themes, plugins, etc...","assets_banners_color":"2e2e2e","last_updated":"2022-06-24 07:18:24","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.krealab.fr\/","header_plugin_uri":"","header_author_uri":"https:\/\/www.krealab.fr","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1577,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"krealab","date":"2020-04-07 13:05:53"},"1.0.1":{"tag":"1.0.1","author":"krealab","date":"2020-08-12 09:00:07"},"1.0.2":{"tag":"1.0.2","author":"krealab","date":"2020-11-05 16:51:34"},"1.0.3":{"tag":"1.0.3","author":"krealab","date":"2021-06-17 12:48:38"},"1.0.4":{"tag":"1.0.4","author":"krealab","date":"2021-12-03 10:09:10"},"1.0.5":{"tag":"1.0.5","author":"krealab","date":"2022-06-24 07:18:24"}},"upgrade_notice":{"1.0":"<p>Initial release<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2249773,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2249773,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":2249773,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2249773,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2249773,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2249773,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2249773,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2249773,"resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"Debug bar open","2":"Settings interface","3":"Pretty error handler with stack frames(powered by Whoops)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[94,2275,1541],"plugin_category":[59],"plugin_contributors":[182295],"plugin_business_model":[],"class_list":["post-117562","plugin","type-plugin","status-publish","hentry","plugin_tags-debug","plugin_tags-developer","plugin_tags-toolbar","plugin_category-utilities-and-tools","plugin_contributors-krealab","plugin_committers-krealab"],"banners":{"banner":"https:\/\/ps.w.org\/kl-debug\/assets\/banner-772x250.png?rev=2249773","banner_2x":"https:\/\/ps.w.org\/kl-debug\/assets\/banner-1544x500.png?rev=2249773","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/kl-debug\/assets\/icon.svg?rev=2249773","icon":"https:\/\/ps.w.org\/kl-debug\/assets\/icon.svg?rev=2249773","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/kl-debug\/assets\/screenshot-1.png?rev=2249773","caption":"Debug bar open"},{"src":"https:\/\/ps.w.org\/kl-debug\/assets\/screenshot-2.png?rev=2249773","caption":"Settings interface"},{"src":"https:\/\/ps.w.org\/kl-debug\/assets\/screenshot-3.png?rev=2249773","caption":"Pretty error handler with stack frames(powered by Whoops)"}],"raw_content":"<!--section=description-->\n<p>Add a Debug Bar to your Wordpress website to debug and develop your themes, plugins, etc...<\/p>\n\n<p>With the plugin you can find every variables you want to debug in the same place and use debug functions to display them.<\/p>\n\n<h4>Prerequisites<\/h4>\n\n<p>To fully help you to debug your website you need to add some code to your <code>wp-config.php<\/code> file.<\/p>\n\n<pre><code>define( 'WP_DEBUG', true ); \/\/ PHP errors, notices and warnings will be displayed\ndefine( 'SAVEQUERIES', true ); \/\/ Display queries in current page\ndefine( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); \/\/ Disable WP Fatal error handler\n<\/code><\/pre>\n\n<h4>Usage of the debug functions<\/h4>\n\n<p>To debug a simple variable you can use:<\/p>\n\n<pre><code>&lt;?php dump( $var ); \/\/ Dump the variable(s) ?&gt;\n<\/code><\/pre>\n\n<p>To debug a variable and stop the process after you can use:<\/p>\n\n<pre><code>&lt;?php dd( $var ); \/\/ This will die after dumping the variable(s) ?&gt;\n<\/code><\/pre>\n\n<h4>Debug a variable in the debug bar<\/h4>\n\n<p>This is one of the main aspect of the plugin, to debug variables in a separate place.<\/p>\n\n<p>The most difficult task when you debug a variable is to deal with container width, with the plugin you have a debug bar where you can add the variables of the current page.<\/p>\n\n<p>To add a variable to the debug bar you can use the function bellow:<\/p>\n\n<pre><code>&lt;?php kl_debug_add_var( $var ); ?&gt;\n<\/code><\/pre>\n\n<p>You can add custom tabs in the debug bar to filter you variables:<\/p>\n\n<pre><code>&lt;?php\nkl_debug_add_var(\n    $var, \/\/ The variable you want to debug\n    'Your variable title', \/\/ If you want to name the variable\n    'The section title', \/\/ The tab title\n    'the-section-slug' \/\/ The tab slug\n);\n?&gt;\n<\/code><\/pre>\n\n<h4>What's Whoops in the setting panel?<\/h4>\n\n<p>Whoops is the framework that we use to display error handling. (cf. Pretty error handler with stack frames)<\/p>\n\n<!--section=installation-->\n<h4>Requirements<\/h4>\n\n<p>This plugin requires at least PHP 7.2.<\/p>\n\n<h4>How to install the plugin<\/h4>\n\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/kl-debug<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the \\'Plugins\\' screen in WordPress<\/li>\n<li>Use the Tools-&gt;KL Debug screen to configure the plugin<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20to%20set%20which%20php%20errors%20are%20reported%3F'><h3>How to set which PHP errors are reported?<\/h3><\/dt>\n<dd><p>Simply add <code>error_reporting(E_ALL &amp; ~E_NOTICE);<\/code> to the top of your theme functions.php file. This will only display errors that are not notices.<\/p><\/dd>\n<dt id='how%20can%20i%20deactivate%20the%20plugin%20if%20i%20can%27t%20access%20the%20admin%20screen%20%3F'><h3>How can I deactivate the plugin if I can't access the admin screen ?<\/h3><\/dt>\n<dd><p>Go to your FTP explorer and navigate to the plugin: wp-content&gt;plugins. Rename the folder by adding an _ in the beginning of the folder name.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>[Added] Tested up to Wordpress 6.0<\/li>\n<li>[Updated] Composer dependencies<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>[Added] Tested up to Wordpress 5.8.2<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>[Added] Tested up to Wordpress 5.7.2<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>[Added] Optimize autoload.php<\/li>\n<li>[Fixed] autoload.php require path that can cause error 500<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>[Fixed] jQuery error when plugin installed on WordPress 5.5<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>[Added] Initial release<\/li>\n<\/ul>","raw_excerpt":"Friendly debug bar for developer, debug variables helpers and pretty error handler interface(powered by Whoops).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/117562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=117562"}],"author":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/krealab"}],"wp:attachment":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=117562"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=117562"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=117562"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=117562"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=117562"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=117562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}