【发布时间】:2025-11-25 07:20:07
【问题描述】:
我不确定问题是什么,它只是不起作用。
路由似乎有效,我的 nginx conf 文件中有一个服务器名称。例如测试网。行得通。
我的项目在 ubuntu 的根目录下,而不是在挂载文件夹中。
我不知道还能尝试什么。
xdebug.ini
[XDebug]
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_port=9002
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=0
xdebug.remote_host=soapboxtest.com
xdebug.idekey=VSCODE
xdebug.remote_autostart=1
xdebug.remote_log=/usr/local/etc/php/xdebug.log
launch.json
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9002,
"log": true,
"externalConsole": false,
"pathMappings": {
"/var/www": "${workspaceRoot}"
},
"ignore": [
"**/vendor/**/*.php"
]
},
请求 cookie
"XDEBUG_SESSION" => "VSCODE"
Dockerfile
FROM php:fpm-alpine3.11
...
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
...
【问题讨论】:
标签: php docker docker-compose xdebug wsl-2