I'd like to use xdebug and vscode to debug a script I'm running via wp eval-file.
My launch.json is pretty basic.
{ "name": "Listen for Xdebug", "type": "php", "request": "launch", "port": 9003 } my php.ini has xdebug config, and debugging a simple stand-alone php script works.
[xdebug] zend_extension="xdebug.so" xdebug.mode=debug xdebug.client_host=127.0.0.1 xdebug.client_port="9003" I am not sure what I could be missing
EDIT This is the php.ini config that ended up working
[xdebug] zend_extension = xdebug xdebug.mode=debug,develop xdebug.start_with_request=yes This is the command
wp eval-file test-debug.php --use-include --skip-wordpress