beyondcode/laravel-dump-server

not working on windows

scplay opened this issue ยท 12 comments

follow the instruction and use same version of php, it not work
image
image
image

Can someone on windows help me out on this?

yep, it's not intercepting dump calls for me too on windows.

Hi,
to get this working on Windows you need to change your configuration file debug-server.php. Seems like 0.0.0.0 does not work on Windows.

<?php // config/debug-server.php

return [
    /*
     * The host to use when listening for debug server connections.
     */
    'host' => 'tcp://127.0.0.1:9912',
];

You can edit the configuration by publishing the package configuration:

php artisan vendor:publish --provider=BeyondCode\\DumpServer\\DumpServerServiceProvider

This worked for me.

Regards
TobyMaxham

@TobyMaxham thank you for the solution... but that command does not generate any files for me in the config directory.

> artisan vendor:publish --provider=BeyondCode\\DumpServer\\DumpServerServiceProvider
Publishing complete.

Process finished with exit code 0 at 11:44:33.
Execution time: 752 ms.

@aledmb

I had a similar issue, in the end I just copied the configuration file from the vendor directly and created the 'debug-server.php' within the config folder of Laravel.

You should be able to copy @TobyMaxham snippet above and just create the 'debug-server.php' manually. The config file is the only asset to publish to get this working and it only contains the single config value as shown in the snippet.

On windows it's only one backslash :)

Also, you can skip the --provider option and just do php artisan vendor:publish and it will let you see the "publishable" providers with a numeric index to pick from.

Thanks @TobyMaxham for that IP change, fixed it for me.

@edvordo good god... that was so clear to see! :D

thank you!

I want to close this issue: Does setting the host IP to 127.0.0.1 fix this on Windows?

Yes, it does.

Thank you. I changed the default config value to be 127.0.0.1 so it will work out of the box in future versions.

Quick tip here for anyone reading this and is using windows + homestead.

You need to run php artisan dump-server from within homestead, not locally.

Quick tip here for anyone reading this and is using windows + homestead.

You need to run php artisan dump-server from within homestead, not locally.

I was looking for a solution, this is exactly that solution, I'm running homestead on windows. I was just running php artisan dump-server from the cli on my hostmachine; Switching to the vagrant box actually worked. Maybe this could be a little information quote in the documentation? Or am I just stupid for not realising this earlier , haha :D