Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 861 Bytes

File metadata and controls

13 lines (11 loc) · 861 Bytes

Xdebug in WSL Docker based Lando

Introduction

Lando is way faster on windows when entirely within in WSL. However, that sometimes makes xdebug connections to IDEs outside of WSL more challenging. This is mostly due to incorrectly reported IP addresses. For this reason instead of relying on the autodetected IP address, I usually use thus custom php.ini and lando file in combination with some custom start-up commands:

alias l-rebuild='z=`grep -E "[0-9.]{3,20}" /etc/resolv.conf -o` && sed -i "s/\b[0-9.]\{3,20\}\b/$z/" php.ini && lando rebuild -y'
alias l-start='z=`grep -E "[0-9.]{3,20}" /etc/resolv.conf -o` && sed -i "s/\b[0-9.]\{3,20\}\b/$z/" php.ini && lando start'
alias l-restart='z=`grep -E "[0-9.]{3,20}" /etc/resolv.conf -o` && sed -i "s/\b[0-9.]\{3,20\}\b/$z/" php.ini && lando restart -y'