https://github.com/devkabir/wp-debugger
WordPress Debugger is a straightforward tool designed to assist you in identifying and resolving errors on your WordPress website.
https://github.com/devkabir/wp-debugger
debug debug-tool debugger debugging debugging-tool wordpress wordpress-plugin wordpress-plugin-dev wordpress-plugin-development
Last synced: 10 days ago
JSON representation
WordPress Debugger is a straightforward tool designed to assist you in identifying and resolving errors on your WordPress website.
- Host: GitHub
- URL: https://github.com/devkabir/wp-debugger
- Owner: devkabir
- Created: 2023-12-03T05:12:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-18T21:53:08.000Z (about 1 month ago)
- Last Synced: 2026-03-19T10:55:27.257Z (about 1 month ago)
- Topics: debug, debug-tool, debugger, debugging, debugging-tool, wordpress, wordpress-plugin, wordpress-plugin-dev, wordpress-plugin-development
- Language: PHP
- Homepage:
- Size: 991 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# WP Debugger
This tool helps developers see and understand errors in WordPress.
## What it does
* Changes big error pages to show:
* The error message, list of function calls, code parts, and source with highlights
* Data from superglobals
* A “Copy for AI” button and an “Ignore error” button (this hides the page when you reload)
* Shows errors in JSON format for JSON or CLI requests
* Can also log HTTP requests and fake responses if `ENABLE_MOCK_HTTP_INTERCEPTOR` is true
* Saves logs in files inside `wp-content/logs/`, and rotates them
## How to install
1. Put the plugin folder into `wp-content/plugins/wp-debugger/`
2. Turn it on in WordPress
(Use `?disable_debug=1` in the URL to stop it from loading)
## How to use
* Cause an error to see the error page, or use `init_debugger()`
* Use these helper functions in `functions.php`:
* `write_log( ...$messages )` — saves messages to `wp-content/logs/0-debugger.log` (auto-rotates)
* `format_stack_trace( $trace )` and `log_stack_trace( $trace )` — clean up and save function call lists
* `dump( ...$vars )` — shows data in a nice way (HTML or JSON)
* `dd( ...$vars )` — dump and stop right away
* `dump_filter_callbacks( $filter, $dump = true )` — look at hook functions (show or save them)
* `recursively_decode_json( $data )` and `debugger_format_variable( $value )` — helper functions for logging
* Skip the error page with `?skip_wp_debugger=1`, or press “Ignore error” to set a cookie that hides it
## HTTP debugging
* Uses `http_api_debug` to save request and response logs to `wp-content/logs/{domain}-requests.log` (errors go to `{domain}-errors.log`)
* If `ENABLE_MOCK_HTTP_INTERCEPTOR` is true, some URLs return fake data from code instead of making a real request