XDebug and PHPUnit - connection with xxx was not established
Hi PHPStormtrooper ;)
Introduction
I'm just switching from Netbeans 8.2 to PHPStorm. Netbeans in most cases worked just fine, fine for my purposes. But Debugging unit tests was always a mess. So I thought, use the educational advantages and give PHPStorm a try :) And woah, when Netbeans was the family car, PHPStorm is the Mercedes Benz S class. But unfortunately the maintenance function is not working... XDebug won't connect with PHPStorm...
So here are a few notes: I use PHPS on a Win10 machine, 64 bit. PHP version is 7.0.xy in combination with xdebug 2.5.xy.
When I turn on XDebug with
I can connect via Telnet.
My debug config:

PHPUnit:

PHP itself:

My simple test class:

PHPStorm invokes following command:
D:\Portable\UwAmp\bin\php\php-7.013.x86vc14ts\php.exe -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 D:\Programmierung\php_tools\php_unit\phpunit-5.6.4.phar --configuration D:\Programmierung\...\backend\phpunit.xml --filter "/::testTrue( .*)?$/" ...\Routes\TestsTest D:\Programmierung\...\backend\test\src\Routes\TestsTest.php --teamcity
I tried php.ini in different manner:, currently running:
[xdebug]
zend_extension = "php_xdebug-2.5.0rc1-7.0-vc14.dll"
;zend_extension = "php_xdebug-2.4.0rc4.dll"
;xdebug.default_enable=1
;xdebug.auto_trace = On
xdebug.remote_enable = On
;xdebug.remote_autostart = On
xdebug.remote_connect_back = On
;xdebug.profiler_enable = On
;xdebug.profiler_enable_trigger = On
;xdebug.profiler_output_name = cachegrind.out.%t.%p
;xdebug.profiler_output_dir = "xdebug_output"
;xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
I really can't figure out what the problem is... Is there any further information I can provide?
Please sign in to leave a comment.
Hi there,
Please check my comments in this thread: https://intellij-support.jetbrains.com/hc/en-us/community/posts/205979264-Xdebug-config-issues-Connection-with-xdebug-2-5-0rc1-was-not-established
In short -- on Windows ... go back to xdebug 2.4.1.
Wow, that did the trick. Thank you!!! This post should be upvoted in some way or you should post this at stackoverflow to get this into the search engines upvoted.
http://stackoverflow.com/questions/tagged/phpstorm+xdebug
If sorted by "newest" -- the first page should have few questions with answers or comments with the similar info.
Feel free to create a better SO question/answer that is easier to find (I could not filter them to include "2.5" mentions only)