beyondcode / laravel-dump-server

Bring Symfony's Var-Dump Server to Laravel
https://beyondco.de/docs/laravel-dump-server/installation
MIT License
1.52k stars 82 forks source link

dump or dump-server doesn't seem to work sometimes on WSL #61

Closed mkantautas closed 5 months ago

mkantautas commented 4 years ago

I am using windows 10 pro wsl (ubuntu 18.04lts) with valet for linux and occasionally the laravel dump stops working - both(the cli and on page).

The only thing that helps it work again for a while is restarting the OS.

restarting php7.4-fpm, nginx, valet, clearing composer dump or clearing cache... Nothing works.

flexchar commented 4 years ago

I'm also on WSL <3. I have observed this couple times. Interestingly enough, I found that php artisan dump-server was running when inspecting with ps aux | grep dump-server even thou no open terminal was present.

What does it mean?

Since the dump server binds to IP and listens, starting another session simply doesn't help as the first one already bound and thus is receiving all the dumps.

How to fix?

Find running process with ps aux | grep dump-server and kill it with kill [pId of the process]

Restart WSL (instead of PC)

You don't need to reboot PC if you want to restart WSL. This may be helpful at times.

If you're on WSL 2, you may restart WSL with wsl --shutdown from Windows Run (Win + R). If you're on WSL 1, you may restart LxxsManager services. Open services.msc and find there.