So I seem to have been able to solve this issue with the tunnel, but remote debugging is still not working.
I fixed the tunnel by modifying the trellis/roles/xdebug-tunnel/defaults/main.yml
file. I’ve changed these two lines
from this
xdebug_tunnel_ssh_user: "{{ hostvars[xdebug_tunnel_inventory_host]['ansible_user'] | default(admin_user) }}"
xdebug_tunnel_ssh_host: "{{ hostvars[xdebug_tunnel_inventory_host]['ansible_default_ipv4']['address'] | default(xdebug_tunnel_inventory_host) }}"
to this
xdebug_tunnel_ssh_user: "{{ admin_user }}"
xdebug_tunnel_ssh_host: "{{ xdebug_tunnel_inventory_host }}"
which forces it to use the standard admin_user
which is ubuntu
for me and then also forces it to use the hostname as defined in the hosts
files for this environment.
I then run nc -zv localhost 9003 || echo "no tunnel open"
to see if the tunnel is open and it returns Connection to localhost port 9003 [tcp/*] succeeded!
This is all great, however, the debugging is not working
Looking further I noticed that in trellis/roles/xdebug/defaults/main.yml
that the value of xdebug_idekey
was set to XDEBUG
and my browser plugin is expecting vsc
(see post xDebug with VS Code)
After closing and reopening the tunnel, the debugger is still not activated. I also re-provisioned the server to see if for some reason that made a difference but no luck.
Would anyone have some tips or has succeeded in doing this already?
Many thanks in advance.