I cannot get the VS Code extension "Php debug" to stop on any breakpoints. I am running the php project (that I want to debug) from Docker on my Ubuntu laptop. Any advice greatly appreciated.
My set up:
- PHP version on Docker: 7.1
- XDebug version on Docker: 2.6.1
- PHP Debug version in VS Code (on my laptop): 1.12.6
My VS Code launch.json file is:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true,
"pathMappings": {
"/var/www/html": "/home/chris/my-test-debugging-project"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
my /usr/local/etc/php/conf.d/xdebug.ini config is:
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=172.17.0.2
xdebug.remote_log=/var/www/html/xdebug.log
xdebug.remote_connect_back=0
xdebug.remote_port=9000
XDebug logfile (from setting xdebug.remote_log in php.ini):
Log opened at 2018-10-14 05:47:16
I: Connecting to configured address/port: 172.17.0.2:9000.
W: Creating socket for '172.17.0.2:9000', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2018-10-
14 05:47:16
The PHP Debug log output (from setting "log": true in launch.json):
<- launchResponse
Response {
seq: 0,
type: 'response',
request_seq: 2,
command: 'launch',
success: true }