{"id":25435672,"url":"https://github.com/umdevelopera/um-debug","last_synced_at":"2025-05-15T01:11:10.378Z","repository":{"id":261773337,"uuid":"542582297","full_name":"umdevelopera/um-debug","owner":"umdevelopera","description":"Simple tool for logging and testing: Debug log, Hook log, Mail log, Execute custom code.","archived":false,"fork":false,"pushed_at":"2025-03-01T20:57:42.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T21:28:19.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umdevelopera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-28T12:35:11.000Z","updated_at":"2025-03-01T20:57:38.000Z","dependencies_parsed_at":"2025-01-20T20:38:05.338Z","dependency_job_id":null,"html_url":"https://github.com/umdevelopera/um-debug","commit_stats":null,"previous_names":["umdevelopera/um-debug"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umdevelopera%2Fum-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umdevelopera%2Fum-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umdevelopera%2Fum-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umdevelopera%2Fum-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umdevelopera","download_url":"https://codeload.github.com/umdevelopera/um-debug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-17T07:30:49.275Z","updated_at":"2025-05-15T01:11:05.371Z","avatar_url":"https://github.com/umdevelopera.png","language":"PHP","readme":"# UM Debug tools\n\nSimple tool for logging and testing.\n\n## Key Features:\n\n* Display content of the _debug.log_ file, color errors and warnings.\n* Filter content of the _debug.log_ file by the key word.\n* Clear _debug.log_ file.\n* Log hooks to _um_hook.log_ file, add information about request and backtrace.\n* Clear _um_hook.log_ file.\n* Log mails to _um_mail.log file_, add information about request and backtrace.\n* Log mails after defined hooks. Log mails with defined subjects.\n* Clear _um_mail.log_ file.\n* Execute custom code.\n* Special functions to debug a variable, backtracking and profiling a code.\n\n## Installation\n\n### How to install from GitHub\n\nOpen git bash, navigate to the **plugins** folder and execute this command:\n\n`git clone --branch=main git@github.com:umdevelopera/um-debug.git um-debug`\n\nOnce the plugin is cloned, enter your site admin dashboard and go to _wp-admin \u003e Plugins \u003e Installed Plugins_. Find the **UM Debug tools** plugin and click the **Activate** link.\n\n### How to install from ZIP archive\n\nYou can install this plugin from the [ZIP file](https://drive.google.com/file/d/12Ik962JkbyWtq3RT51PvU4NqHvx3bz0X/view) as any other plugin. Follow [this instruction](https://wordpress.org/support/article/managing-plugins/#upload-via-wordpress-admin).\n\n\n## How to use\n\n### How to log PHP errors\n\nDebug logging is disabled by default. Enable debug logging if there is no _debug.log_ file at your site. To enable debug logging you should use FTP to open the _wp-config.php_ file, find the line `define( 'WP_DEBUG', false );` and replace this line with a code snippet below:\n```\ndefine( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\ndefine( 'WP_DEBUG_DISPLAY', false );\n```\nSee also [Debugging in WordPress](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/).\n\nGo to *wp-admin \u003e Tools \u003e UM Debug Log* to view the _debug.log_ file records.\n\n### How to log hooks\n\nGo to _wp-admin \u003e Tools \u003e UM Hook Log_.\n\nTurn **ON** the \"Enable\" setting. Turn **YES** the \"Log backtrace\" setting if you wish to log detailed info.\nList hooks you wish to investigate in the **Hooks** setting. You can list multiple hooks separated by commas.\nSave settings.\n\nDo a test. You'll see the hook log records below the settings.\n\nThis tool may be helpful if you need to investigate a redirect. Add the `wp_redirect` hook to the **Hooks** setting then reproduce a redirect. You'll see a redirect backtrace.\n\n**Example 1:** Investigate a redirect.\n![UM Hooks Log](https://github.com/user-attachments/assets/25f70d1d-b575-499c-8ff0-5477d4aa6cec)\n\n### How to log emails\n\nGo to _wp-admin \u003e Tools \u003e UM Mail Log_.\n\nTurn **ON** the \"Enable\" setting. Turn **YES** the \"Log backtrace\" setting if you wish to log detailed info.\nFilter a mail you wish to investigate using the **Conditions** settings. You can filter logging by a specific hook or the email subject. All mails will be logged if **Conditions** are empty.\nSave settings.\n\nSend email from the website. You'll see the mail log records below the settings.\n\n### How to execute custom code\n\nGo to _wp-admin \u003e Tools \u003e UM Testing_. Enter a code to the textarea and click the \"Eval\" button.\n\n### Functions for testing and profiling\n\nAdd `umd( $var, $key )` to the code for which you want to see a variable value. `$key` (string) - optional label for the variable.\n\nAdd `umdb( $key )` to the place in the code for which you want to see a backtrace. `$key` (string) - optional label for the backtrace.\n\nAdd `do_action('umd_profiling');` to the place in the code for which you want to see a timestamp.\n\n## Support\n\nOpen new [issue](https://github.com/umdevelopera/um-debug/issues) if you are facing a problem or have a suggestion.\n\n## Changelog\n\n### 1.5.1: November 17, 2024\n\n* Added: Code editor with PHP syntax highlighting to the \"UM Testing\" page.\n* Added: Ability to save the current code fragment.\n* Added: Language pattern for translation.\n* Fixed: PHP Deprecated creation of dynamic property.\n\n### 1.5.0: October 8, 2024\n\n* Optimized plugin structure\n* Updated documentation\n\n### 1.4.3: April 5, 2020\n\n* Fixed: Hook log settings\n\n### 1.4.2: March 28, 2020\n\n* Fixed: Frontend styles\n\n### 1.4.1: October 31, 2019\n\n* Added: Hook log\n\n### 1.4.0: October 30, 2019\n\n* Added: defined hooks\n* Added: options \"Log mails after these hooks\" and \"Log mails with these subjects\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumdevelopera%2Fum-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumdevelopera%2Fum-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumdevelopera%2Fum-debug/lists"}