php.ini
file configuration to docker:
xdebug.idekey = "VSCODE"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_port = 9000
xdebug.remote_host = <ip-of-docker0-bridge-network>
launch.json
file configuration to vscode-php
...
"port": 9000,
"pathMappings": {
"/var/www/src": "${workspaceRoot}/src",
"/var/www/src/app": "${workspaceRoot}/src/app"
}
},
...
View articles:
http://ramkulkarni.com/blog/setting-up-and-debugging-php7-in-docker/
https://github.com/felixfbecker/vscode-php-debug