Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sakuemon/f11354f3947ded8dcac0 to your computer and use it in GitHub Desktop.
Save sakuemon/f11354f3947ded8dcac0 to your computer and use it in GitHub Desktop.

Intellij IDEAでのPHP remote debug

Debugの設定

Preference -> Languages & Frameworks -> PHP -> Debugを選択 Xdebugのポートをphp.ini等に設定したxdebug.remote_portに合わせる。

Serverの設定

Preference -> Languages & Frameworks -> PHP -> Serversを選択 Serverを追加する。 Use path mappingsにチェックを付ける。 エントリポイントのindex.php、ソースのルートフォルダ、vendorについてAbsolute path on the serverに設定する。 もしこれらがひとつのフォルダ内にあるならそこを指定するだけで良い。 例) local folder /root /app /public(document root folder include index.php) /vendor

remote folder /var/www/app /public(document root)

この構成なら/rootを/var/www/appにマッピングすればOK。

chromeにXdebug helperを入れる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment