Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop xdebug from stopping on first line with PhpStorm?

I'm having this weird problem. All my settings used to work OK, until I updated my version of PHP. I use macports and have the php5 and php5-xdebug ports installed.

xdebug is working, but it is stopping on the first line of my script even though I have the option disabled in PhpStorm. There is no breakpoint there, and breakpoints in other parts of the code are working OK.

If it helps, here is the xdebug portion of phpinfo (in two parts); https://dzwonsemrish7.cloudfront.net/items/3K3R2N1f1A190K372n0S/Screen%20shot%202011-08-18%20at%203.06.29%20PM.png?v=54c8964d, https://dzwonsemrish7.cloudfront.net/items/0i133s0U430k3u3w3B1E/Screen%20shot%202011-08-17%20at%205.14.25%20PM.png?v=1278da84 and the proof it is disabled in phpStorm: https://dzwonsemrish7.cloudfront.net/items/3W2S060I1b0W1q0z0c45/Screen%20shot%202011-08-18%20at%203.07.00%20PM.png?v=85471026

Is there an xdebug setting I need to change? When I did the upgrade, I lost my php.ini that had some other xdebug configuration.

like image 327
pocketfullofcheese Avatar asked Aug 18 '11 22:08

pocketfullofcheese


People also ask

Why is xdebug not working?

Xdebug cannot connect to PhpStorm This means that Xdebug tries to connect to the host and can't make the connection. To fix the issue, set xdebug. remote_connect_back=0 ( xdebug. discover_client_host=false for Xdebug 3) and make sure that xdebug.

Which hotkeys do you use for managing debugging session in PhpStorm?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to PHP | Debug and in the External Connections area, select the Break at first line in PHP scripts checkbox.


2 Answers

The above didn't work for me because as far as I can tell if you're using Xdebug the only debug bookmarklets you get is start/stop and debug this page. I don't see any bookmarklet specific to stopping on first line, and neither the start/stop bookmarklets nor stopping PHPStorm from listening within PHPStorm fixed the problem for me.

To get it to stop I did this (on OS X):

  1. Go to Preferences > Languages & Frameworks > PHP > Debug
  2. Uncheck both of the 'force break at the first line...' options
  3. Apply and close
  4. In the Run menu, uncheck 'Break at the first line in PHP scripts'
like image 68
Justin Avatar answered Sep 23 '22 19:09

Justin


Check the "Force break at the first line..." in the PHP->Debug section of preferences.

enter image description here

BESIDES THAT, also check this setting:

enter image description here

like image 44
klodoma Avatar answered Sep 20 '22 19:09

klodoma