Xdebug with PhpStorm IDE - detects incoming connection but will not bring up debug console

14,411

Solution 1

The problem was fixed by adding the break points to other parts of the code as it was not working when attached to the try clause. Additionally, here are some other tips that might be useful:

  1. Try using a programmatic breakpoint: xdebug_break();
  2. Check that if your php is 32bit then so is the version of Xdebug (or that they are both 64 bit).
  3. The xdebug remote host setting relates to the server IP address (so 127.0.0.1 for local).

Solution 2

In your Phpstorm goto File > Settings > Languages & Frameworks > PHP > Debug.

Under External conections section, mark the checkbox saying

Ignore external connections through unregistered server configurations

This was fixed for me.

Share:
14,411
Joseph Cape
Author by

Joseph Cape

Building huge MySQL queries occasionally recalls Oscar Wilde: “I have spent most of the day putting in a comma and the rest of the day taking it out.”

Updated on June 28, 2022

Comments

  • Joseph Cape
    Joseph Cape almost 2 years

    I have tried to set up Xdebug (2.2.3) with PhpStorm 7.0 and I cannot bring up the step-through debugging console as I have in the past. The guides that I have used to set this up are:

    I know that the Xdebug extension itself is working as the cachegrind.out.3280 files are being created on page load (with 12Mb litany of all of the scripts required and variables/values). My set up in php.ini (php version 5.4.12) is:

    zend_extension="c:/wamp/bin/php/php5.4.12/zend_ext/php_xdebug-2.2.3-5.4-vc9-x86_64.dll"
    xdebug.profiler_output_dir="c:/wamp/tmp"
    xdebug.profiler_output_name="cachegrind.out.%p"
    xdebug.profiler_enable=1
    xdebug.remote_enable=1
    xdebug.remote_port=9000
    xdebug.idekey=xdebug
    xdebug.remote_connect_back=1
    xdebug.remote_host=dashboard.dev
    

    After setting a break point, turning on Xdebug chrome extension, clicking to listen to Xdebug within PhpStorm and refreshing, I get the Incoming Connection from Xdebug dialogue:

     Incoming Connection from Xdebug

    However, when I click Accept, the dialogue disappears and nothing happens.

    If I then go to Settings / PHP / Servers in PhpStorm, I see that a new entry has been created: Settings / PHP / Servers in PhpStorm

    Only by deleting the entry that was added can I get the Incoming Connection dialogue to show up again when I refresh the page. I notice that the port is set to 80 so wondering if that is right since the Xdebug extension is set to run over port 9000; when I click "Validate remote environment" select deployment server, then "Validate", I get: No debug extension is loaded. So I am assuming that the problem is something related to how this is set up.