Docker Compose - XDebug - VScode调试设置

问题描述 投票:1回答:1

我在使用VSCode调试PHP时遇到问题。

Dockerfile EXPOSE端口80

我想调试的页面非常简单:

home.php

<?php

$name = 'AAA';
echo $name; <--- here is the breakpoint

php.ini中

xdebug.default_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_enable = 1
xdebug.remote_port = 80
xdebug.idekey = VSCODE

launch.json(XDebug配置)

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9000
    }
  ]
}

调试控制台没有显示任何错误,但是一旦我加载主页,它就不会在断点处停止。

php debugging visual-studio-code docker-compose xdebug
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.