laravelphpstormxdebug

PHPStorm, Laravel, Xdebug unable to hit my breakpoint


I hope someone can save me from drinking and banging my head against the wall ;) I am trying to use PHPstorm instead of VScode to have a complete out-of-the-box solution.

I can't get xdebug to work; I had it working under vscode.

I am using Laravel and the artisan serve cli command to launch the website. I don't know if that is the problem.

I have setup up my php.ini this way.

enter image description here

My PhpStorm is setup this way

enter image description here

I have set the phpstorm broadcast on

enter image description here

I have download the chrome extension for Xdebug and turned it on.

enter image description here

I turned on my logging in php.ini but all it is saying is

[4840] Log opened at 2024-12-09 02:49:47.225931
[4840] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[4840] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating

I have checked Break at first line in PHP code but there are issues with this.

  1. it is hitting on every single client-side request file that comes down over 50 times it is hitting xdebug break at first line in php code. for laravel that is the server.php file
  2. It never hits my break point if I go through that cycle of continuation.

Notification is being given over and over and over again. enter image description here


Solution

  • If Xdebug is saying "Trigger value for 'XDEBUG_SESSION' not found, so not activating" then it had not seen the cookie.

    Which means that the browser extension did not set the Cookie header.

    A workaround is to set xdebug.start_with_request=yes. (https://xdebug.org/docs/step_debug#activate_debugger)