Vagrant Homestead

reset to original state

./vagrant destroy --force && ./vagrant up

ssh session

vagrant ssh

run ngrok outside of Homestead pointing at one configured site

ngrok http 192.168.10.10:80 -host-header=site.dev

xdebug 3 & vscode

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "log": true,
            "pathMappings": {
                "/home/vagrant/homestead.test": "/home/chris/code/homestead.test"
            }
        }
    ]
}

/etc/php/8.0/fpm/conf.d/20-xdebug.ini

zend_extension=xdebug.so
xdebug.mode = debug
xdebug.discover_client_host = true
xdebug.client_host = 192.168.10.1
xdebug.client_port = 9003
xdebug.max_nesting_level = 512

; required for cli debugging but for browser
; could omit and use query string at end
; of url instead XDEBUG_SESSION_START=name
xdebug.start_with_request = yes

; ensure file exists and is writeable
xdebug.log = /var/log/xdebug.log

for cli debugging
(alias xon=’sudo phpenmod -s cli xdebug’)

xon

after changes

vagrant reload --provision