{"id":27286537,"url":"https://github.com/ascriver/debugview","last_synced_at":"2025-04-11T19:43:16.426Z","repository":{"id":286881266,"uuid":"962850781","full_name":"AScriver/debugview","owner":"AScriver","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-08T20:19:24.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T20:34:26.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AScriver.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":"2025-04-08T19:11:08.000Z","updated_at":"2025-04-08T20:02:30.000Z","dependencies_parsed_at":"2025-04-08T20:44:55.568Z","dependency_job_id":null,"html_url":"https://github.com/AScriver/debugview","commit_stats":null,"previous_names":["ascriver/debugview"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AScriver%2Fdebugview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AScriver%2Fdebugview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AScriver%2Fdebugview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AScriver%2Fdebugview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AScriver","download_url":"https://codeload.github.com/AScriver/debugview/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248468743,"owners_count":21108881,"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-04-11T19:43:15.889Z","updated_at":"2025-04-11T19:43:16.404Z","avatar_url":"https://github.com/AScriver.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DebugView\r\n\r\nDebugView is a custom Monolog handler that sends log messages to the Windows DebugView utility using the `OutputDebugStringA` function from the Windows API.\r\n\r\n## Features\r\n\r\n- Integrates with [Monolog](https://github.com/Seldaek/monolog) for logging.\r\n- Sends log messages directly to DebugView for real-time debugging on Windows systems.\r\n- Lightweight and easy to use.\r\n\r\n## Installation\r\n\r\nTo install the package, use Composer:\r\n\r\n```bash\r\ncomposer require ascriver/debugview\r\n```\r\n\r\n## Usage\r\n\r\nHere is an example of how to use the `DebugViewHandler` in your project:\r\n\r\n```php\r\nuse Monolog\\Logger;\r\nuse Ascriver\\DebugViewHandler;\r\n\r\n// Create a logger instance\r\n$logger = new Logger('debug');\r\n\r\n// Add the DebugViewHandler\r\n$logger-\u003epushHandler(new DebugViewHandler());\r\n\r\n// Log a message\r\n$logger-\u003edebug('This is a debug message');\r\n```\r\n\r\n## Requirements\r\n\r\n- PHP 8.1 or higher\r\n- Windows operating system (required for OutputDebugStringA)\r\n- FFI must be enabled in your PHP configuration (php.ini):\r\n\u003e⚠️ If FFI is disabled or restricted (e.g., in some shared hosting environments), this handler will not function correctly.\r\n\r\n## Development\r\n\r\n### Running Tests\r\n\r\nThis project uses PHPUnit for testing. To run the tests, first install the dependencies:\r\n\r\n```bash\r\ncomposer install\r\n```\r\n\r\nThen, run the tests:\r\n\r\n```bash\r\nvendor/bin/phpunit\r\n```\r\n\r\n### Project Structure\r\n\r\n- `src/`: Contains the main source code, including the `DebugViewHandler` class.\r\n- `tests/`: Contains unit tests for the project.\r\n- `composer.json`: Defines the project dependencies and autoloading configuration.\r\n\r\n### Testing Notes\r\n\r\nThe `DebugViewHandlerTest` includes a test for the `write` method, which uses PHP's `FFI` to mock the `OutputDebugStringA` function. Reflection is used to inject the mock into the handler.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please follow these steps:\r\n\r\n1. Fork the repository.\r\n2. Create a new branch for your feature or bugfix.\r\n3. Write tests for your changes.\r\n4. Submit a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascriver%2Fdebugview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascriver%2Fdebugview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascriver%2Fdebugview/lists"}