xdebug connects but won't break in WordPress with vvv
I am using vvv for local WordPress development and cannot get xdebug to pause on breakpoints.
- I have ssh'ed in and set the xdebug_on command.
- phpinfo() shows xdebug installed and active
- phpinfo() shows remote_autostart and remote_enable both set
- my xdebug client (VS Code) is configured to listen on the same port as xdebug is configured to broadcast.
When I add a breakpoint (for instance, on the first line of substance in WordPress's index.php) and tell my client to listen, then load the page in my browser, I expect xdebug to pause on that line. This expectation is based on previous usage of xdebug.
This doesn't happen, but xdebug and my client seem to connect. That's the part I don't get.
Here is the xdebug log:
[3918] Log opened at 2019-03-09 20:08:19
[3918] I: Connecting to configured address/port: 192.168.50.1:9000.
[3918] I: Connected to client. :-)
[3918] - init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///srv/www/wordpress-one/public_html/index.php" language="PHP" xdebug:language_version="7.2.15-1+ubuntu14.04.1+deb.sury.org+1" protocol_version="1.0" appid="3918" idekey="VVVDEBUG"engine version="2.7.0"![CDATA[Xdebug]]/engineauthor![CDATA[Derick Rethans]]/authorurl![CDATA[https://xdebug.org]]/urlcopyright![CDATA[Copyright (c) 2002-2019 by Derick Rethans]]/copyright/init
[3918]
[3918] - breakpoint_list -i 1
[3918] - response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"/response
[3918]
[3918] - breakpoint_set -i 2 -t line -f file:///e:/work/vvv/VVV/wordpress-one/public_html/index.php -n 14
[3918] - response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="39180029"/response
[3918]
[3918] - breakpoint_list -i 3
[3918] - response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"breakpoint type="line" filename="file:///e:/work/vvv/VVV/wordpress-one/public_html/index.php" lineno="14" state="enabled" hit_count="0" hit_value="0" id="39180029"/breakpoint/response
[3918]
[3918] - breakpoint_list -i 4
[3918] - response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"breakpoint type="line" filename="file:///e:/work/vvv/VVV/wordpress-one/public_html/index.php" lineno="14" state="enabled" hit_count="0" hit_value="0" id="39180029"/breakpoint/response
[3918]
[3918] - run -i 5
[3918] - response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="5" status="stopping" reason="ok"/response
[3918]
[3918] - stop -i 6
[3918] - response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="6" status="stopped" reason="ok"/response
[3918]
[3918] Log closed at 2019-03-09 20:08:19
It shows xdebug understanding my breakpoint, connecting to the client, and registering my browser's load of the page.
(Granted this may be more of an xdebug thing, but it is all based on the vvv setup which is all about WordPress.)