PHPStorm doesn't listen to incoming connections

Hi there,

PHPStorm doesn't listen to incoming connections. Firstly my configuration:

I've installed Xdebug to my local webserver (on macOS), "php -v" returns


PHP 7.2.12 (cli) (built: Nov  9 2018 11:00:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
    with Zend OPcache v7.2.12, Copyright (c) 1999-2018, by Zend Technologies


By activating the Chrome extension, Xdebug writes correctly in the logs:


Log opened at 2019-01-28 20:24:04
I: Connecting to configured address/port:
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" fileuri="file:///###/index.php" language="PHP" xdebug:language_version="7.2.12" protocol_version="1.0" appid="40720" idekey="XDEBUG_ECLIPSE"><engine version="2.6.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" status="stopping" reason="ok"></response>

Log closed at 2019-01-28 20:24:04
My Debug Configuration in PHPStorm

Validating Debugger Configuration returns:

By starting this configuration nothing happens (while I'm requesting "" and log files are written):


... and finally my phpinfo:

xdebug support enabled
Version 2.6.1
Supported protocols
DBGp - Common DeBuGger Protocol
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.filename_format no value no value
xdebug.force_display_errors Off Off
xdebug.force_error_reporting 0 0
xdebug.gc_stats_enable Off Off
xdebug.gc_stats_output_dir /var/tmp/ /var/tmp/
xdebug.gc_stats_output_name gcstats.%p gcstats.%p
xdebug.halt_level 0 0
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 On On
xdebug.profiler_enable_trigger_value no value no value
xdebug.profiler_output_dir /var/tmp/ /var/tmp/
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_log /tmp/xdebug.log /tmp/xdebug.log
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.remote_timeout 200 200
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 /var/tmp/ /var/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

Does anybody knows why it doesn't work? I've read many articles but no solution worked.

Comment actions Permalink

Hi there,

Please change Xdebug port to 9001 or some another number (don't forget to restart webserver, if you have one).

Right now it looks like standard 9000 might be already occupied by php-fpm (most often reason on Mac/Linux) -- Xdebug logs clearly shows that it connects somewhere ... and gets "go away" kind of answer.

Use "sudo lsof -nP -iTCP -sTCP:LISTEN" to see what service listens on TCP 9000 port instead of PhpStorm.


Comment actions Permalink

Your solution worked. Thank you!


Please sign in to leave a comment.