Xdebugとは XdebugはPHPの開発を効率化してくれるデバッガです。 デバッガとはデバッグ(バグの原因を見つける)作業を手伝ってくれるツールのことを言います。 たとえば任意の行で実行をストップしたり、変数の中身を確認したりすることができます。 ようは変数の中身を確認するためにいちいちvar_dumpを使ったり、コメントアウトをしたりしなくて良くなるツールということです。 Xdebugを導入して生産性を爆上げしましょう! 前提環境 macOS Docker For Mac VScode 本記事では以下のような流れで進めていきます。 PHP+Docker環境の構築 Remote Developmentのインストール Xdebugの設定 Xdebugを使ってみる PHP+Docker環境の構築 まずプロジェクトの直下にdocker-compose.ymlファイルを作ります。