PHPBrewでXdebug拡張をインストール
1. 環境
インストールする環境はこんな感じ
$ sw_vers ProductName: macOS ProductVersion: 11.3 BuildVersion: 20E232 $ phpbrew --version phpbrew - 1.27.0 cliframework core: 2.5.4 $ phpbrew list * php-7.4.13 php-7.3.25 $ php -v PHP 7.4.13 (cli) (built: Dec 4 2020 21:48:53) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
2. インストール
$ phpbrew ext install xdebug Downloading https://pecl.php.net/rest/r/xdebug/stable.txt via curl extension [==================================================================] 5.00/5.00B 100% Downloading https://pecl.php.net/rest/r/xdebug/3.0.4.xml via curl extension [==================================================================] 1.70/1.70KB 100% Downloading https://pecl.php.net/rest/r/xdebug/stable.txt via curl extension [==================================================================] 5.00/5.00B 100% Downloading https://pecl.php.net/rest/r/xdebug/3.0.4.xml via curl extension [==================================================================] 1.70/1.70KB 100% Downloading https://pecl.php.net/get/xdebug-3.0.4.tgz via curl extension [==================================================================] 210.81/210.81KB 100% ===> Extracting to /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext... ===> Installing xdebug extension... Log stored at: /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/xdebug/build.log Changing directory to /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/xdebug ===> Phpize... ===> Configuring... ===> Building... ===> Running make all: /usr/bin/make -C '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/xdebug' 'all' >> '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/xdebug/build.log' 2>&1 ===> Installing... ===> Running make install: /usr/bin/make -C '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/xdebug' 'install' >> '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/xdebug/build.log' 2>&1 ===> Extension is installed. ===> Creating config file /Users/YOUR_USER_NAME/.phpbrew/php/php-7.4.13/var/db/xdebug.ini.disabled ===> Enabling extension xdebug [*] xdebug extension is enabled. Done.
$ phpbrew ext |grep xdebug [*] xdebug 3.0.4
3. iniの場所
$ ls ~/.phpbrew/php/php-7.4.13/var/db/xdebug.ini /Users/YOUR_USER_NAME/.phpbrew/php/php-7.4.13/var/db/xdebug.ini