{"id":15700567,"url":"https://github.com/tpaksu/xdebug-toggle","last_synced_at":"2025-05-12T14:17:36.648Z","repository":{"id":57072239,"uuid":"271391496","full_name":"tpaksu/xdebug-toggle","owner":"tpaksu","description":"An XDebug extension toggler artisan command, designed primarily for Laravel Valet, but can be switched to other platforms easily.","archived":false,"fork":false,"pushed_at":"2020-08-12T08:55:20.000Z","size":30,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-12T14:16:55.954Z","etag":null,"topics":["laravel","laravel-artisan-command","xdebug","xdebug-toggle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpaksu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-10T21:41:08.000Z","updated_at":"2023-03-08T02:43:32.000Z","dependencies_parsed_at":"2022-08-24T12:31:07.695Z","dependency_job_id":null,"html_url":"https://github.com/tpaksu/xdebug-toggle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaksu%2Fxdebug-toggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaksu%2Fxdebug-toggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaksu%2Fxdebug-toggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpaksu%2Fxdebug-toggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpaksu","download_url":"https://codeload.github.com/tpaksu/xdebug-toggle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754345,"owners_count":21958843,"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":["laravel","laravel-artisan-command","xdebug","xdebug-toggle"],"created_at":"2024-10-03T19:50:17.061Z","updated_at":"2025-05-12T14:17:36.596Z","avatar_url":"https://github.com/tpaksu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Valet XDebug Toggler Artisan Command\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/tpaksu/xdebug-toggle.svg?style=flat-square)](https://packagist.org/packages/tpaksu/xdebug-toggle)\n[![Build Status](https://img.shields.io/travis/tpaksu/xdebug-toggle/master.svg?style=flat-square)](https://travis-ci.org/tpaksu/xdebug-toggle)\n[![Quality Score](https://img.shields.io/scrutinizer/g/tpaksu/xdebug-toggle.svg?style=flat-square)](https://scrutinizer-ci.com/g/tpaksu/xdebug-toggle)\n[![Total Downloads](https://img.shields.io/packagist/dt/tpaksu/xdebug-toggle.svg?style=flat-square)](https://packagist.org/packages/tpaksu/xdebug-toggle)\n[![StyleCI](https://github.styleci.io/repos/7548986/shield)](https://github.styleci.io/repos/271391496)\n\nThis package automates the XDebug extension activation/deactivation process by adding a console command to Laravel's artisan command. It does these things:\n\n- Modifying the current INI file used by PHP, located with parsing the \"php_info()\" output containing the line \"Loaded Configuration File: [path/to/php.ini]\"\n- Restarting the valet NGINX server with the command `valet restart nginx`\n\nIf you use something else than Laravel Valet, and want to automate your stuff, you can change the **XDEBUG_SERVICE_RESTART_COMMAND** in your environment file, or the `xdebugtoggle.service_restart_command` configuration in xdebug-toggle.php configuration file to suit your own.\n\n## Installation\n\nYou can install the package as a development requirement via composer:\n\n```bash\ncomposer require tpaksu/xdebug-toggle --dev\n```\n\n## Usage\n\nTo enable XDebug in current environment:\n\n``` bash\nphp artisan xdebug on\n```\n\nTo disable it:\n\n``` bash\nphp artisan xdebug off\n```\n\n### Configuration\n\nYou can export the configuration file by running the command:\n\n``` bash\nphp artisan vendor:publish --provider=\"Tpaksu\\XdebugToggle\\XdebugToggleServiceProvider\"\n```\n\nwhich includes:\n\n**service_restart_command** : Gives you the option to run a script after you change the *php.ini* line with the new XDebug status. The default is\n\n```bash\nvalet restart nginx\n```\n\nwhich applies the new php.ini configuration on the PHP running on valet's nginx server.\n\nI tried and succeded with this command on Windows running Laragon with nginx:\n\n```batch\nc:/laragon/bin/nginx/nginx-1.12.0/nginx.exe -p c:/laragon/bin/nginx/nginx-1.12.0 -c conf/nginx.conf -s reload\n```\n\nwhich I changed with setting this environment variable on `.env` and ran `php artisan config:cache` to apply the environment changes:\n\n```ini\nXDEBUG_SERVICE_RESTART_COMMAND=\"c:/laragon/bin/nginx/nginx-1.12.0/nginx.exe -p c:/laragon/bin/nginx/nginx-1.12.0 -c conf/nginx.conf -s reload\"\n```\n\nI could change the configuration setting on `config/xdebug-toggle.php` file too. This would also be a valid modification on the path.\n\n**Note: Don't forget to run `php artisan config:cache` to apply new settings when you change any `.env` parameter or configuration setting. Not only for this package, for all changes inside Laravel.**\n\n\n\n### Testing\n\nAny tests written yet. But I suppose I should.\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details. Any contributions are welcome.\n\n### Security\n\nIf you discover any security related issues, please email tpaksu@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Taha PAKSU](https://github.com/tpaksu)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpaksu%2Fxdebug-toggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpaksu%2Fxdebug-toggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpaksu%2Fxdebug-toggle/lists"}