41
43

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 5 years have passed since last update.

PHPのリモートデバッグ

Last updated at Posted at 2013-07-02

環境

phpstorm: ubuntu (192.168.87.144)
webサーバー: centos (192.168.87.147)

準備(centos側)

$ sudo yum install php-devel gcc gcc-c++ autoconf automake make
$ sudo pecl install xdebug

手順

  • ubuntuでphpstormの「Run>Start Listen PHP Debug Connections」を選択。
  • centosで/etc/php.d/xdebug.iniを編集し、apache再起動。
/etc/php.d/xdebug.ini
; Enable xdebug extension module
;extension=xdebug.so
;zend_extension=/usr/lib64/php/modules/xdebug.so (64bitの場合)
zend_extension=/usr/lib/php/modules/xdebug.so
xdebug.remote_enable= on
xdebug.remote_handler=dbgp
xdebug.remote_host=192.168.87.144
;xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart = on
xdebug.remote_mode=req
xdebug.dump.GET = *
xdebug.dump.POST = *
  • centosから以下実施
$ PHP_IDE_CONFIG='serverName=192.168.87.144' php -dxdebug.remote_host=192.168.87.144 a.php
  • ubuntuでdebuggerが反応することを確認。

ブックマークレットのurl: http://www.jetbrains.com/phpstorm/marklets/

41
43
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
41
43

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?