Xdebug always reloads session using phpStorm

My status has never crossed before or I don’t know how to do it! my development environment was updated to ubuntu 14.04, phpStorm 2016.1 (still in the trial version), java version "1.7.0_95". all settings are fine, and I can debug, but after debugging starts (battle per minute or less) the whole debugging session ends or restarts from the first breakpoint. I also get a lot of messages about a debugging session without prior notice without a debugging request (see the attached plz file).

enter image description here

please let me know what to check or what could be the reason. Thanks in advance.


Update :

Below are the xdebug settings in php.ini

[xdebug] zend_extension="/usr/lib/php5/20121212/xdebug.so" xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_autostart=1 

Development Frame - magento 1.14.2 EE

+5
source share
6 answers

You have remote_autostart turned on, so every time you reload the page, xDebug tries to debug the script, even if that doesn't mean it.

According to the documentation

If this parameter is set to 1, Xdebug will always try to start a remote debugging session and try to connect to the client even if the GET / POST / COOKIE variable was absent.

Set xdebug.remote_autostart = 0 , and this should stop error debugging messages.

+2
source

I will give a clear answer from the official forums

You are right to have a debugging session without any breakpoint achievements, for example. this is usually if you have an Ajax request. The warning is intended to help new users configure the debugger. If the option "Split on the first line" is disabled, and there is some error that allows you to not set the control point settings (for example, there are no typos in the path mappings to PHP: servers, remote and local versions of files are not synchronized, etc.) Then nothing will reload the page. This situation is indistinguishable from the incorrect xdebug configuration (for example, the incorrect "xdebug.remote_host", "xdebug.remote_port"), so you can spend a lot of time to figure out the problem. The message says that the debugger itself is configured correctly and offers you the next step in the troubleshooting process.

If you have no problems and a debugging session without breakpoints is expected, then just turn it off

+1
source

You mentioned that you are using php_fpm, so try running

 sudo service php5-fpm restart 
0
source

but after debugging starts (bits per minute or less) the entire debugging session ends or restarts from the first breakpoint

I finally found a solution. My Apache configuration was configured to stop connection downtime after 40 seconds β€” terminate the debugging session and return a 500 error to the client.

To fix this, open the apache httpd.conf file and find the following setting

 LoadModule fcgid_module modules/mod_fcgid.so 

If you use this module, set or change the value of the following directive

 FcgidIOTimeout 300 

This parameter defaults to 40 seconds, if not specified, setting it to 300 will allow up to 5 minutes to connect before apache completes it.

0
source

most of the other answers are valid, but in my case it was an incompatibility between the PHP version and the Xdebug version. therefore, the solution for me updated both PHP => PHP 7 and Xdebug to the latest stable version. I felt it was better to mention this in a separate answer if someone could come in the same case.

0
source

Go to PHPStorm - Settings β†’ Languages ​​and Framework β†’ PHP β†’ Debugging

... Section "External Connections" β†’ "Break the first line in PHP scripts" ... disable this option

Additional offer:

... Section "Xdebug" β†’ disable the last two flags ("Power gap in the first line ...")

... Section "Advanced settings" β†’ disable "Notify if a debugging session has ended without suspension"

0
source

Source: https://habr.com/ru/post/1246853/


All Articles