Debug connection with Xdebug was not established

Hi guys!

Firstly i'd like to thank you for PHPStorm it is really awesome!

I'm trying to use Xdebug by debugging PHPUnit test case and the subject error is always displays.

I did all advices from this comment:
but it not helped

Btw debugging using bookmarklets not works for me too (

I'm using PHPStorm 2.1 with Ubuntu 10.04

Comment actions Permalink


Do you use firewall or something that can prevent connections to PhpStorm?

Also please leave your xdebug settings here.

Thank you for feedback!

Comment actions Permalink

Hello !

I work with xdebug and xampp 1.7.4 on a windows 7, 64 bit pc.
The debugging works fine.
Which xdebug - roles are in the php.ini.

Greetings Stephan

Comment actions Permalink

Hello Nikolay

I dont use firewall

Here is xdebug settings:

xdebug.auto_trace Off Off
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.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.idekey root no value
xdebug.max_nesting_level 100 100
xdebug.overload_var_dump On On
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir /tmp /tmp
xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p
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_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /tmp /tmp
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
Comment actions Permalink


Your xdebug settings looks OK.
Please attach screenshot of your debug settings(Project Settings -> PHP -> Debug) and describe used run configurations.

Thank you for feedback!

Comment actions Permalink


Here is my debug settings:

And i'm not sure what you mean about run configuration

Comment actions Permalink

I just found the problem. The solution is a first jrebelo comment here: 

It was because I used php.ini to enbale xdebug. Thats why it is not worked for PHP CLI . So i created /etc/php5/conf.d/xdebug.ini with:

xdebug.remote_enable = 1

The problem solved. Thank you
Comment actions Permalink

Hello, Dima  We should provide proper validation for such cases. Please vote -  Thank you for feedback!

Comment actions Permalink

I got this issue too, and the problem was with Windows Firewall.

Comment actions Permalink

Same problem with the default php version installed in MacOs, adding the `xdebug.remote_enable = 1` solved it. 

Comment actions Permalink

Another fix for this:

PHP-FPM explicitly uses port 9000. Changing the xdebug config to use port 9001 should fix this problem.

Remember to update the IntelliJ/PHPStorm config, too.

Comment actions Permalink

Thanks Matt, it worked for me.


Please sign in to leave a comment.