{"id":14442,"date":"2013-02-15T06:36:38","date_gmt":"2013-02-15T06:36:38","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/debugger\/"},"modified":"2013-05-05T23:08:52","modified_gmt":"2013-05-05T23:08:52","slug":"debugger","status":"publish","type":"plugin","link":"https:\/\/tah.wordpress.org\/plugins\/debugger\/","author":8307150,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4","stable_tag":"1.4","tested":"3.6.1","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Debugger Plugin","header_author":"Modern Tribe, Inc.","header_description":"","assets_banners_color":"a6dbea","last_updated":"2013-05-05 23:08:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"http:\/\/tri.be\/","rating":4.5,"author_block_rating":0,"active_installs":10,"downloads":4311,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":"1","5":"1"},"assets_icons":[],"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"703944","resolution":"1544x500","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"703944","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1","1.3","1.4"],"block_files":[],"assets_screenshots":{"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1573780","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1573780","resolution":"1","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1573780","resolution":"2","location":"plugin"}},"screenshots":{"1":"Use the debugger to track how much time or memory hooks or benchmarked parts of code take to execute.","2":"Configure your test parameters in wp-config.php or right in the admin.","3":"Use the debugger to dump stack traces or pass data to see what the data looks like."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[94,22216,23061,23044,4933],"plugin_category":[43,54,59],"plugin_contributors":[77692,77671,77672],"plugin_business_model":[],"class_list":["post-14442","plugin","type-plugin","status-publish","hentry","plugin_tags-debug","plugin_tags-debugger","plugin_tags-modern-tribe","plugin_tags-profiling","plugin_tags-tribe","plugin_category-customization","plugin_category-security-and-spam-protection","plugin_category-utilities-and-tools","plugin_contributors-jbrinley","plugin_contributors-moderntribe","plugin_contributors-peterchester","plugin_committers-jbrinley","plugin_committers-moderntribe"],"banners":{"banner":"https:\/\/ps.w.org\/debugger\/assets\/banner-772x250.png?rev=703944","banner_2x":"https:\/\/ps.w.org\/debugger\/assets\/banner-1544x500.png?rev=703944","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/debugger_a6dbea.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/debugger\/trunk\/screenshot-1.png?rev=1573780","caption":"Use the debugger to track how much time or memory hooks or benchmarked parts of code take to execute."},{"src":"https:\/\/ps.w.org\/debugger\/trunk\/screenshot-2.png?rev=1573780","caption":"Configure your test parameters in wp-config.php or right in the admin."},{"src":"https:\/\/ps.w.org\/debugger\/trunk\/screenshot-3.png?rev=1573780","caption":"Use the debugger to dump stack traces or pass data to see what the data looks like."}],"raw_content":"<!--section=description-->\n<p>You can use this plugin to manually log data or to capture logging on WordPress actions. You can capture load time, memory, backrace, data dumps, urls, and server IPs.<\/p>\n\n<p>This is designed to either be managed using wp-config.php and logging OR using the admin and debugbar plugin ( http:\/\/wordpress.org\/extend\/plugins\/debug-bar\/ ). Most of the following documentation applies equally to the settings panel or the wp-config.php vars.  Either one works fine. The only exception is the DEBUG_LOG configuration which is only supported as a wp-config var.<\/p>\n\n<p>Firstly, you can manually log things using the following function:<\/p>\n\n<pre><code>do_action( 'log', $message, $group, $data );\n<\/code><\/pre>\n\n<p>The $group allows you to selectively output logging based on groups of log messages. The $message is the string you want to see in the log. $data is an optional parameter for the data that you want to display in the log (objects, arrays, or any other sort of data really).<\/p>\n\n<p>To render messages to the log, you must configure wp-config.php as follows:<\/p>\n\n<p>Run debug on only these groups. Use 'ALL' to debug everything. The group 'ACTIONS' is reserved for WordPress actions.<\/p>\n\n<pre><code>define( 'DEBUG_GROUPS', 'ACTIONS,default,myspecialgroup' );\n<\/code><\/pre>\n\n<p>Display these outputs in the log for each log message.<\/p>\n\n<pre><code>define( 'DEBUG_PARAMS', 'time,timedelta,memory,memorydelta,data,backtrace,url,server' );\n<\/code><\/pre>\n\n<p>WordPress actions that you wish to log.<\/p>\n\n<pre><code>define( 'DEBUG_ACTIONS', 'wp_head,switch_theme,wp_footer' );\n<\/code><\/pre>\n\n<p>Optional restriction by URL (useful on MU installs).<\/p>\n\n<pre><code>define( 'DEBUG_URLS', 'myurl.com' );\n<\/code><\/pre>\n\n<p>Minimum time in milliseconds required to register a log entry as being slow. Default 0 for no minumum.<\/p>\n\n<pre><code>define( 'DEBUG_MIN_TIME', 500 );\n<\/code><\/pre>\n\n<p>Minimum memory in killobytes required to register a log entry as being heavy. Default 0 for no minumum.<\/p>\n\n<pre><code>define( 'DEBUG_MIN_MEM', 1024 );\n<\/code><\/pre>\n\n<p>Path to log file or set to TRUE to use php error log. Default FALSE for no logging.<\/p>\n\n<pre><code>define( 'DEBUG_LOG', '\/path\/to\/writable\/log\/file' );\n<\/code><\/pre>\n\n<p>or<\/p>\n\n<pre><code>define( 'DEBUG_LOG', TRUE );\n<\/code><\/pre>\n\n<h4>Todo<\/h4>\n\n<ul>\n<li>Add variable for sample rate so that this could run randomly on production installs<\/li>\n<li>Admin panel per site<\/li>\n<li>Admin panel globally<\/li>\n<li>WordPress error logging<\/li>\n<li>Mysql query logging<\/li>\n<li>WP_Error integration<\/li>\n<li>Alerts ex: if this takes more than this much memory then log it...<\/li>\n<\/ul>\n\n<!--section=changelog-->\n<h4>1.4<\/h4>\n\n<ul>\n<li>Bug fixes<\/li>\n<li>Add screenshots<\/li>\n<li>Tune CSS performance in debug bar<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Add settings panel and options based configuration.<\/li>\n<li>Log the specific url when http curl hook is logged.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Rename 'delta' to 'timedelta' and add 'memorydelta'<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Improve loading order to ensure that production sites aren't adversely effected when no debugging is needed.<\/li>\n<li>Update logging display.<\/li>\n<li>Add initializer message so that it's clear when a new load has started.<\/li>\n<li>Clean up debug bar UI a bit.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<p>Initial Release.<\/p>","raw_excerpt":"You can use this plugin to manually log data or to capture logging on WordPress actions. You can capture load time, memory, backrace, data dumps, urls &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/14442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=14442"}],"author":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/moderntribe"}],"wp:attachment":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=14442"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=14442"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=14442"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=14442"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=14442"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=14442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}