I’m struggling a bit with this, too. Purchased @nathanielks’s wonderful tutorial (https://roots.io/screencasts/debugging-php-with-xdebug), and working with with Visual Studio Code (v1.59.1
), php 7.4.22
and xDebug v3.0.4
.
Check the xDebug upgrade guide.
A few updates to the tutorial for xDebug 3:
- Make sure you are using current defaults for the role and check the template and tasks.
-
xdebug_remote_autostart: 1
now would bexdebug_start_with_request: 1
- Default
"port"
is now9003
, not9000
. -
roles/xdebug/defaults/main.yml
is a good starting place for vars to override ingroup_vars/development/php.yml
, for examplexdebug_show_local_vars
defaults to0
.
You may want to rebase your updates over the latest trellis. Make sure you are working with a .git
base directory of trellis
and not the directory above site
and trellis
. Also make sure group_vars/all/main.yml
contains php_version: "7.4"
, which is a new parameter.
Provisioning just xDebug:
ANSIBLE_TAGS=xdebug vagrant provision
(For some reason reprovisioning via trellis-cli
fails, at least called with $ trellis provision --tags xdebug development
yields /bin/sh: lsb_release: command not found
.)