{"id":3144,"date":"2025-04-01T23:28:12","date_gmt":"2025-04-02T02:28:12","guid":{"rendered":"https:\/\/brasofilo.com\/?p=3144"},"modified":"2025-04-08T00:20:32","modified_gmt":"2025-04-08T03:20:32","slug":"view-debug-log","status":"publish","type":"post","link":"https:\/\/brasofilo.com\/en\/view-debug-log\/","title":{"rendered":"View Debug Log"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"view-debug-log\"><strong>View Debug Log<\/strong><\/h3>\n\n\n\n<p class=\"has-small-font-size\"><em>A lightweight developer tool for real-time WordPress debug monitoring<\/em><\/p>\n\n\n\n<p><strong>Plugin URL<\/strong>: <a href=\"https:\/\/github.com\/brasofilo\/view-debug-log\">GitHub Repository<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"key-features\"><strong>Key Features<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Real-Time Debug Log Viewer<\/strong>\n<ul class=\"wp-block-list\">\n<li>Displays <code>WP_DEBUG_LOG<\/code> output directly in WordPress admin<\/li>\n\n\n\n<li>No need to manually access <code>wp-content\/debug.log<\/code> via FTP\/SFTP<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Privacy &amp; Security<\/strong>\n<ul class=\"wp-block-list\">\n<li>Access restricted to users with <code>manage_options<\/code> capability (Admins only)<\/li>\n\n\n\n<li>No database writes &#8211; reads log file directly<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Troubleshooting Tools<\/strong>\n<ul class=\"wp-block-list\">\n<li>File size monitoring<\/li>\n\n\n\n<li>Quick log clearing functionality<\/li>\n\n\n\n<li>Line number reference for errors<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Lightweight Implementation<\/strong>\n<ul class=\"wp-block-list\">\n<li>Single admin page (~50KB memory usage)<\/li>\n\n\n\n<li>No external dependencies<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"technical-implementation\"><strong>Technical Implementation<\/strong><\/h3>\n\n\n\n<p>\u2705 <strong>Admin Interface<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Adds &#8220;Debug Log&#8221; submenu under Tools\/Dashboard<\/li>\n\n\n\n<li>Uses WordPress core filesystem API for secure file access<\/li>\n<\/ul>\n\n\n\n<p>\u2705 <strong>Compatibility<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Works with default <code>WP_DEBUG_LOG<\/code> configuration<\/li>\n\n\n\n<li>Tested with PHP 7.4+ and WordPress 5.6+<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ideal-use-cases\"><strong>Ideal Use Cases<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Development Environments<\/strong>\n<ul class=\"wp-block-list\">\n<li>Rapid debugging during plugin\/theme development<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Staging Sites<\/strong>\n<ul class=\"wp-block-list\">\n<li>Monitor errors before pushing to production<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Troubleshooting<\/strong>\n<ul class=\"wp-block-list\">\n<li>Diagnose white screens or unexpected behavior<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Maintenance<\/strong>\n<ul class=\"wp-block-list\">\n<li>Regular error log reviews<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"limitations\"><strong>Limitations<\/strong><\/h3>\n\n\n\n<p>\u26a0\ufe0f <strong>Not for Production<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Debug logs should never be publicly accessible on live sites<\/li>\n<\/ul>\n\n\n\n<p>\u26a0\ufe0f <strong>Large Files<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>May struggle with log files &gt;10MB (no pagination)<\/li>\n<\/ul>\n\n\n\n<p>\u26a0\ufe0f <strong>No Filtering<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basic view-only interface without search\/filter capabilities<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installation\"><strong>Installation<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Download ZIP from GitHub<\/li>\n\n\n\n<li>Upload to <code>\/wp-content\/plugins\/<\/code><\/li>\n\n\n\n<li>Activate in WordPress admin<\/li>\n<\/ol>\n\n\n\n<p><strong>Configuration<\/strong>:<\/p>\n\n\n\n<p>Requires <code>WP_DEBUG_LOG<\/code> enabled in <code>wp-config.php<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_DEBUG', true );\nif (WP_DEBUG) {\n    define( 'WP_DEBUG_LOG', false );\n    define( 'WP_DEBUG_DISPLAY', false );\n    # One level up from WordPress installtion\n    $path = realpath($_SERVER[\"DOCUMENT_ROOT\"] . '\/..') . '\/debug.log';\n    @ini_set('log_errors', 'On');\n    error_reporting(0);\n    @ini_set('display_errors', 0);\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>View Debug Log A lightweight developer tool for real-time WordPress debug monitoring Plugin URL: GitHub Repository Key Features Technical Implementation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3158,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1265],"tags":[],"class_list":["post-3144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/posts\/3144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/comments?post=3144"}],"version-history":[{"count":3,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/posts\/3144\/revisions"}],"predecessor-version":[{"id":3159,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/posts\/3144\/revisions\/3159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/media\/3158"}],"wp:attachment":[{"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/media?parent=3144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/categories?post=3144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brasofilo.com\/wp-json\/wp\/v2\/tags?post=3144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}