16
17

More than 5 years have passed since last update.

PhpStomr+xampp+xdebugでブレークポイントをはるところまで(Windows環境)

Posted at

PhpStomrとxamppは既にインストール済み前提。

php.iniの設定

xamppには既にxdebugが入っているため、設定を有効にする。

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000

apache再起動後、phpinfo.phpで設定が反映されていることを確認する。

PhpStormの設定

File->Settings->PHP->Debug
Debug portはデフォルトで9000だけど一応確認。(xdebug.remote_portと同じ値にする。)

動作確認

メニューバーの電話マークを押して、ブレークポイントをはってブラウザからリクエストして、ブレークポイントで止まることを確認する。

16
17
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
16
17