dyegonery's avatar

Laravel 5 with Xdebug always throws "The payload is invalid."

I configured Xdebug on VScode to debug my laravel application. But, when I start to debug, laravel always throws this error: ' Exception has occurred. Illuminate\Contracts\Encryption\DecryptException: The payload is invalid. '

I already tried to run 'php artisan optimize'.

Anyone here already faced this issue? I'm using Laravel 5.5

0 likes
3 replies
dyegonery's avatar

It seems that this problem happens only with Laravel 5. I tried to debug some code on a Laravel 4 app, and it debugs normally.

jwheat's avatar

I get the same thing using 5.4

The same Xdebug config works in PHP Storm, so I'm pretty confident it is setup properly on my box.

The quick fix / workaround I found was to uncheck the "Everything" box under Breakpoints in the lower left, then everything is happy.

dyegonery's avatar

@jwheat At the end, I was able to to solve this issue.

Here's how I did it:

Run these commands: php artisan optimize php artisan cache:clear composer dump-autoload

After this, clear the cookies from your browser, and that's it.

1 like

Please or to participate in this conversation.