View Issue Details

IDProjectCategoryView StatusLast Update
0001366XdebugStep Debuggingpublic2016-12-04 18:33
Reportertomzx Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindowsOS Version7 x64
Product Version2.5.0RC1 
Fixed in Version2.5.0 
Summary0001366: Cannot start a debugging session on Windows
Description

PHP 7.1.0RC6 with xdebug 2.5.0rc1 under PHPStorm 10 and 2016.3.

In PHPStorm, when starting a debugging session, a message "Connection with 'xdebug 2.5.0rc1' was not established" is first displayed with a link to "Validate the installation".

Upon validating the installation, the message "Debug extension settings was updated. Please re-run current configuration to use new values." is displayed. Doing so results in the same issue (namely xdebug is never triggered).

If I switch to my setup where I use PHP 7.0.12 and xdebug 2.4.1, everything works fine. I've then attempted to use xdebug 2.5.0rc1 with 7.0.12, and at this point it does not work anymore.

If I run php 7.0.12 from the command line, I get an error saying "The procedure entry point zend_pass_function could not be located in the dynamic link library php7ts.dll". Then PHP prints out "Failed loading (PATH TO XDEBUG DLL).

Interestingly enough, if I set xdebug.default_enable=1 under PHP 7.1.0RC6 with xdebug 2.5.0rc1, then I can see the traces being displayed in the output, which leads me to believe that the extension work semi-properly, except that the remote debugging is more likely the cause issue.

Steps To Reproduce
  • Setup PHP 7.1.0RC6 under Windows (7?)
  • Set a breakpoint under PHPStorm
  • Start a debugging session under PHPStorm
  • Notice that the breakpoint is not triggered
Additional Information

It might appear to be potentially related with https://bugs.xdebug.org/view.php?id=1361.

TagsNo tags attached.
Operating SystemWindows 7 x64
PHP Version7.1-dev

Activities

tomzx

2016-11-19 20:32

reporter   ~0003766

I downloaded Netbeans 8.2 and reproduced the issue mentioned in the additional information section.

Thus, I'd say that those two issues present the same symptoms of the same underlying cause.

Also similar log messages
Log opened at 2016-11-19 20:31:18
I: Connecting to configured address/port: 127.0.0.1:9000.
W: Creating socket for '127.0.0.1:9000', WSAPoll: 0.
E: Could not connect to client. :-(
Log closed at 2016-11-19 20:31:18

derick

2016-11-22 23:26

administrator   ~0003775

If you try to make a debug log as is done in
http://bugs.xdebug.org/view.php?id=1361, and described at
https://xdebug.org/support.php#remote, does it also include the error about
WSAPOLL?

The error you described with:

If I run php 7.0.12 from the command line, I get an error saying "The
procedure entry point zend_pass_function could not be located in the
dynamic link library php7ts.dll". Then PHP prints out "Failed loading
(PATH TO XDEBUG DLL).

Is because you load an Xdebug version that is compiled for PHP 7.1, with PHP
7.0. So that is expected.

cheers,
Derick

tomzx

2016-11-23 00:27

reporter   ~0003782

@derick

I do not get anything else than what was described in note #3766 (so WSAPoll: 0).

I've tried disabling all extensions and the problem still persist.

I've also rebooted in order to make sure something else wasn't interfering.

derick

2016-11-23 21:17

administrator   ~0003787

Can you please provide the output of the log @tomxz?

I'd like to see it all, instead of just your summary.

derick

2016-11-23 21:33

administrator   ~0003789

Sorry, never mind that question.

derick

2016-12-02 11:52

administrator   ~0003868

tomzx, can you try the right DLL from https://xdebug.org/files/xdebug-vc14-latest.tgz, that is likely php_xdebug-master-7.0-vc14-x86_64.dll, but use your judgement

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

tomzx

2016-12-02 18:03

reporter   ~0003872

Last edited: 2016-12-02 18:21

@derick, xdebug appears to attach correctly now under PHP 7.0.13.

However, when I hit a breakpoint, it crashes under PHP 7.1.0. The crash is 100% reproducible. However, it is also possible to have xdebug work correctly for other "simpler" scripts.

Could you provide me with the .pdb file for php_xdebug-master-7.1-vc14-x86_64.dll (or all of the .dll .pdb) so that I may give you a better callstack?

Otherwise, I've uploaded https://fkcd.ca/iTb/php-xdebug.dmp which is the dump file I generated when it crashed.

Would you prefer I create a new issue as it does not appear to be related to attaching xdebug to an IDE anymore?

Let me know if you need anything else.

-----Exception-----
Unhandled exception thrown: read access violation.

ht was 0x1.

If there is a handler for this exception, the program may be safely continued.

-----Code line-----
HASH_PROTECT_RECURSION(ht);

-----Callstack-----

php7ts.dll!zend_hash_apply_with_arguments(_zend_array ht, int()(_zval_struct , int, char , _zend_hash_key ) apply_func, int num_args, ...) Line 1558 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b75786() Unknown
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b70931() Unknown
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b77920() Unknown
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b771e3() Unknown
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b6ef63() Unknown
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b688c5() Unknown
php7ts.dll!zend_extension_statement_handler(const _zend_extension
extension, _zend_execute_data frame) Line 1497 C
php7ts.dll!zend_llist_apply_with_argument(_zend_llist
l, void()(void , void ) func, void arg) Line 236 C
php7ts.dll!ZEND_EXT_STMT_SPEC_HANDLER(_zend_execute_data execute_data) Line 1555 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data
execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data
execute_data) Line 1076 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data
ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data execute_data) Line 1076 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data
execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!zend_call_function(_zend_fcall_info
fci, _zend_fcall_info_cache fci_cache) Line 829 C
php7ts.dll!reflection_method_invoke(_zend_execute_data
execute_data, _zval_struct return_value, int variadic) Line 3316 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b66601() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data
execute_data) Line 1099 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data
ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data execute_data) Line 1076 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data
execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(_zend_execute_data
execute_data) Line 949 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data
ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(_zend_execute_data execute_data) Line 949 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data
execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(_zend_execute_data
execute_data) Line 949 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data
ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(_zend_execute_data execute_data) Line 949 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data
execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data
execute_data) Line 1076 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data
ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data execute_data) Line 1076 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data
execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(_zend_execute_data
execute_data) Line 949 C
php7ts.dll!ZEND_USER_OPCODE_SPEC_HANDLER(_zend_execute_data execute_data) Line 1819 C
php7ts.dll!execute_ex(_zend_execute_data
ex) Line 432 C
php_xdebug-master-7.1-vc14-x86_64.dll!000007fef4b65f61() Unknown
php7ts.dll!zend_execute(_zend_op_array op_array, _zval_struct return_value) Line 475 C
php7ts.dll!zend_execute_scripts(int type, _zval_struct retval, int file_count, ...) Line 1475 C
php7ts.dll!php_execute_script(_zend_file_handle
primary_file) Line 2533 C
php.exe!do_cli(int argc, char argv) Line 991 C
php.exe!main(int argc, char argv) Line 1378 C
[External Code]
----Locals-----
apply_func php_xdebug-master-7.1-vc14-x86_64.dll!0x000007fef4b74fb0 (load symbols for additional information) int()(_zval_struct , int, char , _zend_hash_key )

  • args 0x0000000008459bb0 "xÑ\x5" char *
  • hash_key {h=0 key=0x0000000000000000 <NULL> } _zend_hash_key
  • ht 0x0000000000000001 {gc={refcount=??? u={v={type=??? flags=??? gc_info=??? } type_info=??? } } u={v={...} ...} ...} _zend_array *
    idx Variable is optimized away and not available.
    num_args 1 int
    p Variable is optimized away and not available.
    result Variable is optimized away and not available.

derick

2016-12-02 23:18

administrator   ~0003873

tomzx - please do not use a bug report for other issues than the originally reported one.

In this case, this was also reported as https://bugs.xdebug.org/view.php?id=1373, and which I fixed earlier today. I have not yet rebuilt the Windows DLLs.

I will close this issue, as you've confirmed Xdebug correctly attaches now.

Issue History

Date Modified Username Field Change
2016-11-18 23:41 tomzx New Issue
2016-11-19 20:32 tomzx Note Added: 0003766
2016-11-22 23:26 derick Note Added: 0003775
2016-11-22 23:26 derick Assigned To => derick
2016-11-22 23:26 derick Status new => feedback
2016-11-23 00:27 tomzx Note Added: 0003782
2016-11-23 00:27 tomzx Status feedback => assigned
2016-11-23 21:17 derick Note Added: 0003787
2016-11-23 21:17 derick Status assigned => feedback
2016-11-23 21:33 derick Note Added: 0003789
2016-11-23 21:33 derick Status feedback => assigned
2016-12-02 11:35 derick Status assigned => confirmed
2016-12-02 11:52 derick Note Added: 0003868
2016-12-02 11:52 derick Status confirmed => feedback
2016-12-02 18:03 tomzx Note Added: 0003872
2016-12-02 18:03 tomzx Status feedback => assigned
2016-12-02 18:15 tomzx Note Edited: 0003872
2016-12-02 18:21 tomzx Note Edited: 0003872
2016-12-02 18:21 tomzx Note Edited: 0003872
2016-12-02 23:18 derick Note Added: 0003873
2016-12-02 23:18 derick Status assigned => closed
2016-12-02 23:18 derick Resolution open => fixed
2016-12-02 23:18 derick Fixed in Version => 2.5.0RC2
2016-12-04 17:41 derick Summary Cannot start a debugging session => Cannot start a debugging session on Windows
2016-12-04 18:33 derick Fixed in Version 2.5.0RC2 => 2.5.0
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging