2
2

More than 3 years have passed since last update.

MAMP環境でxdebugを有効化する手順

Last updated at Posted at 2020-06-14

xdebugとは、PHPのデバッグ機能を拡張してくれるツールです。

MAMPでxdebugを使えるようにする手順メモとして残しています。

1.php.iniを編集

php.iniを開きます。
MAMPのパスは、MAMP/bin/php/php7.4.2/conf/php.iniのようになっています。

[xdebug]
zend_extension="/Applications/MAMP/bin/php/php7.4.2/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1

xdebugのzend_extension=...がコメントアウトされているので解除して、下の二行を記述します。

2.MAMPを再起動

MAMPのStop Serversで一旦切って、再起動します。
Screen Shot 0032-06-14 at 14.12.47.png

3.TOOLSで確認

MAMPのOpen WebStart pageから、TOOLS→PHPINFOを確認します。
Screen Shot 0032-06-14 at 14.13.32.png

xdebugが表示されていればOKです。

Screen Shot 0032-06-14 at 14.03.59.png

2
2
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
2
2