Общая конфигурация ниже,
launch.json
Код: Выделить всё
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9001,
"stopOnEntry":true,
"log": true,
"hostname": "localhost",
"pathMappings": {
"/var/www/html": "${workspaceRoot}",
"/app": "${workspaceRoot}/app"
}
}
]
}
Код: Выделить всё
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.discover_client_host=1
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/68738661/xdebug-starts-the-connection-and-than-closes-automatically[/url]