1

I'm using PhpStorm and Laravel and when I want to debug my application, but the pointer stops at the first line of 'server.php' (you can see it in the below picture).

enter image description here

Meysam Zarei
  • 419
  • 2
  • 14
  • Not sure if it's the same, I use Eclipse and there is a setting something like *Stop at first line of code* when I'm debugging. – Nigel Ren Jun 01 '20 at 06:51
  • @NigelRen PhpStorm has the same option but it's disabled by default. – Meysam Zarei Jun 01 '20 at 06:57
  • @MeysamZarei 1) What is your IDE version exactly? Xdebug version? 2) if you use "Step over" or alike -- does it move to next line? if not -- what does it do? 3) Show debugger settings from IDE Settings/Preferences 4) What about missing/bad path mapping? What d you have set up at "Settings/Preferences | Languages & Frameworks | PHP | Server" for that – LazyOne Jun 01 '20 at 16:11

2 Answers2

3

1- Go to Settings > Languages & Frameworks > PHP > Debug

2- Uncheck ' break at the first line...' options

3-In the Run menu, uncheck 'Break at the first line in PHP scripts'

see:

https://stackoverflow.com/a/19185093/10573560

OMR
  • 11,736
  • 5
  • 20
  • 35
0

You need to use Path Mappings in the server config, even though there isn't a remote server per se running if using Valet. It is stopping here because the server.php is located in the .composer directory of your home, way out of the project scope. If you check use path mappings and put the root project as the absolute path on server it should work (worked for me). Hope this helps someone.

enter image description here

Charles Harmon
  • 380
  • 2
  • 10