0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PhpstromにXdebugを導入する

Last updated at Posted at 2022-07-12

環境概要

Summary
Xdebug installed: no
Server API: Command Line Interface
Windows: no
Zend Server: no
PHP Version: 7.4.5
Zend API nr: 320190902
PHP API nr: 20190902
Debug Build: no
Thread Safe Build: no
OPcache Loaded: yes
Configuration File Path: /usr/local/etc/php/7.4
Configuration File: /usr/local/etc/php/7.4/php.ini
Extra Configuration Files Path: /usr/local/etc/php/7.4/conf.d
Extra Configuration Files:
/usr/local/etc/php/7.4/conf.d/ext-opcache.ini
Extensions directory: /usr/local/lib/php/pecl/20190902

手順

php.iniからXdebugのインストール手順を把握する

下記の記事を参考に、
xdebug.orgでXdebugのインストール手順を把握する

php -i > phpinfo.txt でphp.iniに書かれている内容を書き出し、
その内容をxdebug.orgに転記する。

具体的なインストール手順

  1. Download xdebug-3.1.5.tgz
    2.Install the pre-requisites for compiling PHP extensions.
     On your Mac, we only support installations with 'homebrew',
    and brew install php && brew install autoconf should pull in the right packages.
  2. Unpack the downloaded file with tar -xvzf xdebug-3.1.5.tgz
  3. Run: cd xdebug-3.1.5
  4. Run: phpize (See the FAQ if you don't have phpize).

As part of its output it should show:

Configuring for:
...
Zend Module Api No:      20190902
Zend Extension Api No:   320190902

If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.

  1. Run: ./configure
  2. Run: make
  3. Run: cp modules/xdebug.so /usr/local/lib/php/pecl/20190902
  4. Create /usr/local/etc/php/7.4/conf.d/99-xdebug.ini and add the line:
    zend_extension = xdebug

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?