我在使用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
}
]
}
调试控制台没有显示任何错误,但是一旦我加载主页,它就不会在断点处停止。