Xdebug config issues - Connection with 'xdebug 2.5.0rc1' was not established Follow
I've read a couple of posts relating to this error message and tried one or two things without any success. I am getting the message "Connection with 'xdebug 2.5.0rc1' was not established. Validation Installation" when I run debug in PHPStorm. I then get the 'Debug extension settings was updated. Please re-run current configuration to use new values..'. Any help would be appreciated.
Debug runs but it runs all the way through to the end of the script without stopping at any of the breakpoints. I've set the interpreter as the php.exe file in xampp which is 5.6.28
See my php.ini config:
[XDEBUG]
zend_extension = C:\xampp\php\ext\php_xdebug-2.5.0rc1-5.6-vc11.dll
xdebug.default_enable=1
;xdebug.idekey=PHPSTORM
;xdebug.remote_enable=1
;xdebug.remote_autostart=0
;xdebug.remote_port=9000
;xdebug.remote_connect_back=1
;xdebug.remote_host=localhost
As you can see they are all commented out apart from the top 2 but I have tried various combinations using the commented out lines in conjunction with the others.
See phpinfo:
xdebug support | enabled |
---|---|
Version | 2.5.0rc1 |
IDE Key | jonat |
Supported protocols | Revision |
---|---|
DBGp - Common DeBuGger Protocol | $Revision: 1.145 $ |
Directive | Local Value | Master Value |
---|---|---|
xdebug.auto_trace | Off | Off |
xdebug.cli_color | 0 | 0 |
xdebug.collect_assignments | Off | Off |
xdebug.collect_includes | On | On |
xdebug.collect_params | 0 | 0 |
xdebug.collect_return | Off | Off |
xdebug.collect_vars | Off | Off |
xdebug.coverage_enable | On | On |
xdebug.default_enable | On | On |
xdebug.dump.COOKIE | no value | no value |
xdebug.dump.ENV | no value | no value |
xdebug.dump.FILES | no value | no value |
xdebug.dump.GET | no value | no value |
xdebug.dump.POST | no value | no value |
xdebug.dump.REQUEST | no value | no value |
xdebug.dump.SERVER | no value | no value |
xdebug.dump.SESSION | no value | no value |
xdebug.dump_globals | On | On |
xdebug.dump_once | On | On |
xdebug.dump_undefined | Off | Off |
xdebug.extended_info | On | On |
xdebug.file_link_format | no value | no value |
xdebug.force_display_errors | Off | Off |
xdebug.force_error_reporting | 0 | 0 |
xdebug.halt_level | 0 | 0 |
xdebug.idekey | no value | no value |
xdebug.max_nesting_level | 256 | 256 |
xdebug.max_stack_frames | -1 | -1 |
xdebug.overload_var_dump | 2 | 2 |
xdebug.profiler_aggregate | Off | Off |
xdebug.profiler_append | Off | Off |
xdebug.profiler_enable | Off | Off |
xdebug.profiler_enable_trigger | Off | Off |
xdebug.profiler_enable_trigger_value | no value | no value |
xdebug.profiler_output_dir | \ | \ |
xdebug.profiler_output_name | cachegrind.out.%p | cachegrind.out.%p |
xdebug.remote_addr_header | no value | no value |
xdebug.remote_autostart | Off | Off |
xdebug.remote_connect_back | Off | Off |
xdebug.remote_cookie_expire_time | 3600 | 3600 |
xdebug.remote_enable | On | On |
xdebug.remote_handler | dbgp | dbgp |
xdebug.remote_host | localhost | localhost |
xdebug.remote_log | no value | no value |
xdebug.remote_mode | req | req |
xdebug.remote_port | 9000 | 9000 |
xdebug.scream | Off | Off |
xdebug.show_error_trace | Off | Off |
xdebug.show_exception_trace | Off | Off |
xdebug.show_local_vars | Off | Off |
xdebug.show_mem_delta | Off | Off |
xdebug.trace_enable_trigger | Off | Off |
xdebug.trace_enable_trigger_value | no value | no value |
xdebug.trace_format | 0 | 0 |
xdebug.trace_options | 0 | 0 |
xdebug.trace_output_dir | \ | \ |
xdebug.trace_output_name | trace.%c | trace.%c |
xdebug.var_display_max_children | 128 | 128 |
xdebug.var_display_max_data | 512 | 512 |
xdebug.var_display_max_depth | 3 | 3 |
Please sign in to leave a comment.
Hi there,
Try xdebug 2.4.1 instead of 2.5
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205417890-Adding-Debugger-Support-to-PhpStorm-Project
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205972064-PHPSTORM-not-receiving-debug-connection-from-xdebug-2-5
If still nothing -- collect and provide xdebug log for such unsuccessful debug session (check my comments in last thread)
xdebug 2.5 RC1 does not work for me either (tested only with PHP 5.6.28 x32 nts and PHP 7.0.13 x32 nts on Windows 10 Pro x64). But 2.4.1 works just fine with both of them.
Xdebug tickets on similar issue:
Seems like only Windows affected, regardless of the IDE used.
Hi,
i've same problem, when I installed new php71.
The main problem is, that old xdebug was still listening on same port 9000.
Set in xdebug.ini port xdebug.remote_port=9071 and then in Phpstom in sections PHP/Debug, section Xdebug, debug port = 9071.
Optinally (if u use debug proxy), change it also in section DBGp Proxy to 9071.
@Jan Machala
Not your case.
OP was working with XAMPP on Windows and was using xdebug 2.5.0rc1 which has issues on Windows (as indicated by xdebug tickets). xdebug 2.5.0 final has them resolved.
About your case... sounds like you are running php-fpm .. which communicates with web server on the same port as xdebug (TCP 9000) -- at least this is the case for typical nginx + php setup on Linux/Mac (regardless of PHP version used -- applies to PHP 5.6 as well). I do not remember seeing notes where it would state that PHP 7.1 from now will use TCP 9000 for own stuff so xdebug have to use other ports instead...
If you are referring to running multiple php/xdebug versions at the same time -- right now I do not see why they could not use the same port .. as it's xdebug that connects to client (PhpStorm in our case).
Not my case Andry,
I'm running php-cli, port 9000 is used exclusively by xdebug.
Changing port worked for me, by the root cause was probable somewhere else.
Sorry for input not related input.
Cheers
Jan Machala
Is this a problem for OSX too?
My problem was on OSX.
@Bryon
The issue that OP had was Windows specific and appeared for xdebug 2.5.0RC1 only
In your case it most likely completely different thing -- try different xdebug port (as you may have conflict with php-fpm (which uses the same TCP 9000 port by default) .. which is more common these days on Mac/Linux)
have same problem, solved by @Jan Machala's solution(OSX10.12.2 & phpstrom2016.3.2 & php71-xdebug )
default php-fpm is auto start when login. and php-fpm occupy 9000 port, so i config xdebug with 9001 port, then everything work fine.
% lsof -i :9000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php-fpm 476 LeBlanc 6u IPv4 0xeaf2c42a024ae48b 0t0 TCP localhost:cslistener (LISTEN)
php-fpm 493 LeBlanc 0u IPv4 0xeaf2c42a024ae48b 0t0 TCP localhost:cslistener (LISTEN)
php-fpm 954 LeBlanc 0u IPv4 0xeaf2c42a024ae48b 0t0 TCP localhost:cslistener (LISTEN)
% lsof -i :9001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
phpstorm 968 LeBlanc 363u IPv4 0xeaf2c42a0305748b 0t0 TCP *:etlservicemgr (LISTEN)
phpstorm 968 LeBlanc 449u IPv4 0xeaf2c42a0305aa5b 0t0 TCP localhost:etlservicemgr->localhost:49893 (ESTABLISHED)
php 1088 LeBlanc 12u IPv4 0xeaf2c42a024b086b 0t0 TCP localhost:49893->localhost:etlservicemgr (ESTABLISHED)
@ Jan Machala's solution worked for me too, also on macOS. Not really sure what was preventing port 9000 from working, and it actually all worked in the browser, just not in debug. Anyway, thanks!
OMG THANK YOU SOO MUCH. I LITERALLY just spent 12 hrs trying to fix this problem... AND THIS MAKES NO SENSE CUZ ALL OF THE ONLINE TUTORIALS ARE WRONG!! (about port 9000) I Hope we as a community can fix this. My brain is officially fried now... I'm gonna take a nap and dream of world where problems like this don't keep me up at night lol.
-Thank you.
I had this error and changing the port xdebug was running on and then changing the setting in PHPstorm that it was listening for xdebug on. this solved the problem for me.
@admins
Please close this thread.
Original issue was very specific (specific xdebug build on Windows platform) and it was quite long time ago (and affected maybe 2-3 weeks span till newer build became available).
All other comments have no relation to the original issue. No need to mix them up in one place -- better use separate/other threads instead.