title: Xdebug unable to connect to client, where do I start debugging the debugger?
body: <p>I'm setting up xdebug for php within sublime text, and xdebug keeps on logging errors related to being unable to connect:</p>
  
  <pre><code>Log opened at 2016-08-18 21:06:01
  I: Connecting to configured address/port: localhost:9988.
  E: Could not connect to client. :-(
  Log closed at 2016-08-18 21:06:01
  </code></pre>
  
  <p>I hoped that debugging directly by going to <code>http://localhost:9988</code> in my browser might help, but it simply displays the google chrome error page: "localhost refused to connect".  Perhaps the error exists on the other end, that data can't be pushed to the sublime text client, I don't know.  Sublime text xdebug does show the message "Reloading /var/log/xdebug/xdebug.log" when I run tests/etc, so it seems to be aware of the php code being run, just doesn't get any further.</p>
  
  <p>So, I never thought I would have to debug xdebug itself, but: How can I debug the xdebug to code editor connection?  If this were nginx, I would start debugging the virtualhost, but since it's xdebug... ...I have no idea where to start debugging the lack of an app to connect to?</p>
  
  <h2>## Various Configuration Settings ##</h2>
  
  <p>I am on ubuntu linux 14.04.</p>
  
  <p>Here is my xdebug.ini conf if pertinent:</p>
  
  <pre><code>[xdebug]
  xdebug.default_enable=1
  xdebug.remote_enable=1
  xdebug.remote_autostart=1
  xdebug.remote_host="localhost"
  xdebug.remote_handler="dbgp"
  xdebug.remote_port=9988
  xdebug.remote_mode = req
  xdebug.overload_var_dump=0
  xdebug.idekey = sublime.xdebug
  xdebug.remote_log="/var/log/xdebug/xdebug.log"
  ;https://github.com/martomo/SublimeTextXdebug
  </code></pre>
  
  <p>Xdebug installed:</p>
  
  <pre><code>apt-cache policy php-xdebug
  php-xdebug:
    Installed: 2.4.0-5+donate.sury.org~trusty+1
    Candidate: 2.4.0-5+donate.sury.org~trusty+1
    Version table:
   *** 2.4.0-5+donate.sury.org~trusty+1 0
          500 http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main amd64 Packages
          100 /var/lib/dpkg/status
  </code></pre>
  
  <p>Module active:</p>
  
  <pre><code>php -m | grep -i xdebug
  xdebug
  Xdebug
  </code></pre>
  
  <p>phpinfo xdebug settings:</p>
  
  <p><a href="https://i.stack.imgur.com/mwMU8.png"><img src="https://i.stack.imgur.com/mwMU8.png" alt="xdebug settings via phpinfo"></a></p>