View Issue Details

IDProjectCategoryView StatusLast Update
0001361XdebugStep Debuggingpublic2017-01-03 18:57
Reporteritchickatl69 Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformWindowsOSWindowsOS Version10 Home
Product Version2.5.0RC1 
Summary0001361: Fails to connect with same settings that work fine with 2.4
Description

Attempts to debug any PHP script using Xdebug connected through Netbeans fails. It appears to hang at "Waiting for a Connection". After verifying all settings and doing the usual network-related troubleshooting, I compared my PHP.INI file on this machine with one an another where XDebug was working. The most significant difference was the version of XDebug which lead to my identifying the problem to be version specific.

Steps To Reproduce

Download and copy extension to PHP\EXT folder (Windows).
Restart Apache 2.4
Launch Netbeans 8.2
Load or type any trivial PHP script, and initiate debugging
Hangs .. "Waiting for connection"

Additional Information

As a test I installed the version that was working on the other machine onto this one, updated PHP.ini, restarted Apache and Netbeans, and everything worked.

Version that isn't connectiong:
;zend_extension = c:\server\php\ext\php_xdebug-2.5.0rc1-5.6-vc11.dll

Version that is working:
zend_extension = c:\server\php\ext\php_xdebug-2.4.1-5.6-vc11.dll

A few lines from the debug log showing the connection with the 2.4x version that works:

Log opened at 2016-11-15 18:57:27
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:///C:/server/htdocs/test3/INICleaner.php" language="PHP" xdebug:language_version="5.6.1-dev" protocol_version="1.0" appid="11888" idekey="netbeans-xdebug"><engine version="2.4.1"><![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>

<- feature_set -i 0 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>

<- feature_set -i 1 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>

The entirety of the output when it fails (with 2.5xxRC version):

Log opened at 2016-11-15 18:55:29
I: Connecting to configured address/port: 127.0.0.1:9000.
W: Creating socket for '127.0.0.1:9000', WSAPoll: 10022.
E: Could not connect to client. :-(
Log closed at 2016-11-15 18:55:29

Log opened at 2016-11-15 18:55:29
I: Connecting to configured address/port: 127.0.0.1:9000.
W: Creating socket for '127.0.0.1:9000', WSAPoll: 10022.
E: Could not connect to client. :-(
Log closed at 2016-11-15 18:55:29

TagsNo tags attached.
Operating SystemWindows 10 Home 64 bit
PHP Version5.6.20-5.6.24

Activities

Jim Bacon

2016-11-17 10:03

reporter   ~0003758

Similar problem. NetBeans will not connect with
Windows 7
NetBeans 8.2
Xampp 7.0.9 updated with PHP 7.0.13-Win32-VC14-x86
Xdebug 2.5.0rc1-7.0-vc14 (as recommended by download wizard)

Revert to php_xdebug-2.4.1-7.0-vc14 making no other changes then connection is made and all is well

felixfbecker

2016-11-21 16:31

reporter   ~0003771

Hi, I am the author of https://github.com/felixfbecker/vscode-php-debug.
Ever since XDebug 2.5.0RC1 became the "stable" release on PECL and the recommended version by the Wizard, I am flooded by people telling me the debugger doesn't connect. Example remote_log:

Log opened at 2016-11-16 20:46:04
I: Connecting to configured address/port: localhost:9000.
W: Creating socket for 'localhost:9000', WSAPoll: 10022.
W: Creating socket for 'localhost:9000', WSAPoll: 10022.
E: Could not connect to client.
Log closed at 2016-11-16 20:46:04

Everyone who reported this said everything was working fine once they downgraded to 2.4. The problem I see is that while 2.5.0 is only RC, it is still recommended by the wizard and "stable" on PECL.

derick

2016-11-22 11:36

administrator   ~0003772

If I don't mark it as stable, then nobody tests it ;-)

There seems to be an issue with socket connections on Windows, I will have to check what causes this. The network code in 2.5.x has been redone, so that's likely to cause the problem here.

derick

2016-11-22 23:26

administrator   ~0003776

This is likely to be the same issue as 0001366.

derick

2016-12-02 11:49

administrator   ~0003867

itchickatl, can you try the php_xdebug-master-5.6-vc11.dll DLL from https://xdebug.org/files/xdebug-vc11-latest.tgz

Jim Bacon, can you try php_xdebug-master-7.0-vc14.dll from https://xdebug.org/files/xdebug-vc14-latest.tgz

felixfbecker, can you try (or direct people) to use the right DLLs from either https://xdebug.org/files/xdebug-vc11-latest.tgz or https://xdebug.org/files/xdebug-vc14-latest.tgz

If this works, then I will create another RC (RC2), which should have this fixed.

Jim Bacon

2016-12-12 18:12

reporter   ~0004038

Not tested exhaustively but worked immediately, effortlessly and beautifully. Thank you.

derick

2017-01-03 18:57

administrator   ~0004142

Thanks for letting me know. I'm closing this out.

Issue History

Date Modified Username Field Change
2016-11-15 19:20 itchickatl69 New Issue
2016-11-17 10:03 Jim Bacon Note Added: 0003758
2016-11-21 16:31 felixfbecker Note Added: 0003771
2016-11-22 11:36 derick Note Added: 0003772
2016-11-22 11:36 derick Assigned To => derick
2016-11-22 11:36 derick Status new => acknowledged
2016-11-22 23:26 derick Note Added: 0003776
2016-12-02 11:35 derick Status acknowledged => confirmed
2016-12-02 11:49 derick Note Added: 0003867
2016-12-02 11:49 derick Status confirmed => feedback
2016-12-12 18:12 Jim Bacon Note Added: 0004038
2017-01-03 18:57 derick Note Added: 0004142
2017-01-03 18:57 derick Status feedback => resolved
2017-01-03 18:57 derick Resolution open => no change required
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging