Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julienfalque/xdebug
Enables Xdebug for CLI PHP scripts on demand
https://github.com/julienfalque/xdebug
debug php php-cli
Last synced: about 1 month ago
JSON representation
Enables Xdebug for CLI PHP scripts on demand
- Host: GitHub
- URL: https://github.com/julienfalque/xdebug
- Owner: julienfalque
- License: mit
- Created: 2017-01-03T09:50:48.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2020-11-29T12:48:24.000Z (almost 4 years ago)
- Last Synced: 2023-10-01T08:22:12.540Z (about 1 year ago)
- Topics: debug, php, php-cli
- Language: Shell
- Homepage:
- Size: 22.5 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Xdebug
======This little shell script allows you to enable Xdebug on demand when running a PHP script.
Xdebug is a powerful tool to debug PHP scripts, but is also known to be a performance killer: enabling it by default for CLI scripts will slow down all PHP commands such as Composer or PHPUnit. It is then recommended to not load the Xdebug extension at all for CLI. If you need to debug a script, enable the extension just for this script.
_Note: the script was tested with PhpStorm only._
Compatibility
------------The script currently supports PHP 7.2+ and Xdebug 2+.
Installation
------------Copy the [xdebug file](./xdebug) in a directory that is part of your `PATH` so it can be executed globally.
Usage
-----When you need to debug a PHP script, just prefix your command with `xdebug`:
`$ xdebug phpunit`
`$ xdebug php script.php`