View Issue Details

IDProjectCategoryView StatusLast Update
0001289XdebugUsage problems (Wrong Results)public2016-05-10 19:45
ReporteragemmellAssigned Toderick 
PriorityhighSeverityblockReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformOSOSXOS Version10.10.5
Product Version2.4.0 
Target VersionFixed in Version 
Summary0001289: Not breaking at breakpoints
DescriptionXdebug appears to be fully enabled and logging information to a file but PHPStorm is not detecting the connection and so isn't stopping at breakpoints.
Steps To ReproduceIn PHPStorm, activate the "Listen for debug connections" button.
Set a couple of break points in my test script.
Visit the test script in my browser.
Activate the "Debug" button in the Chrome extension Xdebug Helper.
Refresh the browser page to trigger the debugging
Additional InformationI'm a long time user of xdebug and this is the first time I've been completely stumped at how to resolve it not working!
Yesterday I upgraded my OSX version of PHP using Homebrew. I was using PHP 5.5 (which xdebug was working with). I uninstalled the 5.5 brew packages and brew installed the following new ones:
php70, php70-intl, php70-opcache, php70-xdebug.

I setup xdebug with the same INI directives I always use:
zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
xdebug.remote_enable=1
;xdebug.remote_host="localhost"
xdebug.remote_host="127.0.0.1"
;xdebug.remote_connect_back=1
;xdebug.remote_port=9000
xdebug.profiler_enable_trigger=1
;xdebug.profiler_output_dir=/tmp
xdebug.idekey="PHPSTORM"
xdebug.remote_log=/tmp/xdebug-remote.log
xdebug.max_nesting_level=250

Here is my test script I am using - I have breakpoints set on lines 3 and 4:
<?php
xdebug_break();
phpinfo();
$test = 'test';
?>

I tail the xdebug-remote.log file when trying to connect and can see xdebug doing something but PHPStorm doesn't react at all. Here is the output from debug connection attempt:

Log opened at 2016-03-30 15:17:31
I: Connecting to configured address/port: 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Users/alexgemmell/sites/untitled/test.php" language="PHP" xdebug:language_version="7.0.4" protocol_version="1.0" appid="441" idekey="PHPSTORM"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="break" reason="ok"><xdebug:message filename="file:///Users/alexgemmell/sites/untitled/test.php" lineno="10"></xdebug:message></response>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

Log closed at 2016-03-30 15:17:31

TagsNo tags attached.
Operating SystemOSX 10.10.5
PHP Version7.0.0-7.0.4

Activities

agemmell

2016-03-30 16:46

reporter   ~0003574

FYI I am using PHPStorm 10.0.3

agemmell

2016-04-01 02:31

reporter   ~0003575

I resolved this. I did a LOT of changing things around but finally got to a configuration that worked. Here's a listof things I changed:

* I tried just moving xdebug on to port 9009 to avoid a php-fpm running on port 9000 but surprisingly that wasn't enough to make it work.
 * In Apache (v2.4.16) I stopped using php-fpm and instead used the loaded module "LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so"
 * I updated my site's Apache conf to not point to php-fpm and instead use "SetHandler application/x-httpd-php"

That seemed to do the trick!

derick

2016-05-10 19:45

administrator   ~0003590

I am not sure what that could be. Xdebug would not start running without
the IDE executing the "run" command, which your log doesn't seem to do.
But as you've managed to solve this, I think I'm just going to mark it as
"Can not reproduce". Thanks for the report though!

Issue History

Date Modified Username Field Change
2016-03-30 15:23 agemmell New Issue
2016-03-30 16:46 agemmell Note Added: 0003574
2016-04-01 02:31 agemmell Note Added: 0003575
2016-05-10 19:45 derick Note Added: 0003590
2016-05-10 19:45 derick Status new => resolved
2016-05-10 19:45 derick Resolution open => unable to reproduce
2016-05-10 19:45 derick Assigned To => derick
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)