Help us understand the problem. What is going on with this article?

xdebugでリモートデバッグ (apache on docker,Visual Studio Code)

More than 1 year has passed since last update.

環境

  • macOS High Sierra
  • Docker Version 17.09.1-ce-mac42 (21090)
  • Visual Studio Code バージョン1.19.1 (1.19.1)

Visual Studio Code

  • 拡張機能[PHP Debug]をインストール
  • デバッグしたいソースのあるフォルダを開き[shift + cmd + d]を押下しデバッグウィンドウを開く
  • 構成の追加から以下の構成を追加する
{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "XDebug on docker",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
                // {apache上のdocument root}:{ローカルのdocument root}
                "/var/www/html":"${workspaceRoot}/"
            }
        }
    ]
}
docker上のソースのパス ローカルのソースのパス Visual Studio Codeで開いたフォルダ
/var/www/html/hello.php ~/www/html/hello.php ~/www/html
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした