Debugger Configuration Validation with PhpStorm

While it’s very straightforward to set up PhpStorm’s debugger, nothing is more frustrating than not getting it to work because of a tiny configuration mistake in php.ini. Speaking for myself, I’ve missed xdebug.remote_enable on a number of occasions, which usually happen at the most inconvenient time.

Using the Debugger Configuration Validation introduced with the latest version of the PhpStorm 7 EAP, we can now easily validate our debugger setup and have PhpStorm tell us if we’ve missed something! PhpStorm can verify our configuration of Xdebug and Zend Debugger. Here’s how.

When configuring the PHP interpreter for our project, PhpStorm will inform us if a debugger is installed and will yield the Xdebug or Zend Debugger version used.

From the Settings | Project Settings | PHP | Servers window, we can validate our debugger setup using the Validate Remote Environment button.

This will open a new window where we can test the deployment environment on which we want to attach the debugger and validate the debugger configuration. This deployment environment can be “In place”, e.g. a local webserver or a remote server which is accessible by PhpStorm. Once we click Validate, PhpStorm will tell us if anything is missing (and what). Note that it can do that for both Xвebug and Zend Debugger.

There we are! I missed xdebug.remote_enable again. If we select different options in PhpStorm from our deployment environment, Debugger Validation Configuration will detect that:

If we’ve configured everything correctly, PhpStorm will be happy to tell:

This new feature will save some time trying to figure out what is wrong with the debugger configuration. Give PhpStorm 7 EAP a try and as always, let us hear your thoughts in the issue tracker, through the comments below or in our forums!

Develop with pleasure!
– JetBrains PhpStorm Team

This entry was posted in Cool Feature, Early Access Program and tagged , , , . Bookmark the permalink.
  • Paul Redmond

    I’ve been looking around for an existing issue or request for adding Xdebug links for PHPStorm. It would be really awesome the click links in the browser and go directly to an exception.

    • Sebastien Collado

      You can try “Remote Call” plugin to emulate this feature :

    • Marcel Anacker

      There are already several ways to do this.
      One is described here, using the Remote Call plugin and an AJAX request:

      Another way, which I use on Windows works as follows: (couldn’t find the original blog post)
      – Create a script which runs PHPStorm.exe with the given parameters

      var editor = '"C:\\Program Files (x86)\\JetBrains\\PhpStorm 130.1481\\bin\\PhpStorm.exe" --line %line% "%file%"';

      var url = WScript.Arguments(0);
      var match = /^editor:\/\/open\/\?file=(.+)&line=(\d+)$/.exec(url);
      if (match) {
      var file = decodeURIComponent(match[1]).replace(/\+/g, ' ');
      var command = editor.replace(/%line%/g, match[2]).replace(/%file%/g, file);
      var shell = new ActiveXObject("WScript.Shell");
      shell.Exec(command.replace(/\\/g, '\\\\'));

      – Create a custom protocol handler via the following registry file:


      @="URL:editor Protocol"
      "URL Protocol"=""

      @="wscript \"C:\\dev\\editor.js\" \"%1\""

      – Add the following line to your xdebug config:


    • Andriy Bazanov
  • Paul Redmond

    Oh, and the debugging feature is a really nice addition. I’ve ran into trouble here and there helping set others up with XDebug, and this will be really handy for troubleshooting.

  • Serge Baranov

    There is a typo: “Remote debug is not enable”.

  • Petr T.
  • Henning Kvinnesland

    There is a way. Format your exceptions correctly and use this plugin:

  • Andriy Bazanov

    Will it recognize situation when both Zend Debugger as well as Xdebug (or any other debugging engines) are enabled/loaded in php.ini ?

    This is not a rare situation when new users trying to debug PHP code, especially when they are new to this.

    • Mikhail Vink

      Yes, it will write: “Both Xdebug and Zend Debugger extensions are loaded”


    Good day! I know this is kinda off topic but I was wondering if
    you knew where I could locate a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having trouble finding one?
    Thanks a lot!

  • http://Failedtoexecutevalidationscript Joe Kaiser

    Any idea why I’d get a “Failed to execute validation script” error?

  • S.Shevchuk

    Same problem “Failed to execute validation script” error

  • gafreax

    I’ve some trouble with debuggin zf2 app: I solved setting local path and remote root path to :

  • Anton Larsen

    running a php script (commandline) with debugging enabled does not seem to work for me.

    It says “Connection with ‘xdebug’ was not established. Validate installation”. And when i click validate installation i get: “Cannot parse configuration file”.

    Xdebug does work with PHPUnit though.

    • Svetlana Zemlyanskaya

      Please, check if debugger extension is detected by PhpStorm (Settings | PHP | Interpreters) and check the result of detection with phpinfo() output. In case you’ll find some differences (e.g. phpinfo() shows that debug extention is loaded, but PhpStorm can’t detect it) report new issue:

  • Paul


    Running nginx in a Vagrant box, with my xdebug config in a separate xdebug.ini file. Running phpinfo confirms that the xdebug config is loaded but PHPStorm still issues warning that xdebug.remote_enable isn’t set in php.ini.
    How do I get it to recognize my external config file?

    • Maarten Balliauw

      Can you check if the output of php -i contains the xdebug.remote_enable setting? PhpStorm basically runs a phpinfo() call on the server to determine configuration.

  • Will Melbourne

    How do we set the PHP location when it is installed in vagrant so isn’t accessible from the same directory structure?


    • Will Melbourne

      Apologies that should read

      How do we set the PHP location when it is installed in vagrant as isn’t accessible from the same directory structure? As far as I can tell the only files of the vagrant guest machine which are accessible are the shared directory. System files like the PHP folder location don’t seem to be available.


  • Mauro Miotello

    I’ve a doubt:
    if i’ve a remote web server with xdebug installed, why phpstorm need a local php interpreter on my local machine ?

    thanks for help


    • Maarten Balliauw

      To run things locally. In PhpStorm 8 EAP, we’ve made it possible to configure the remote interpreter instead.

  • Steve

    I’ve tied myself up in all kinds on knots trying to configure Xdebug with Wamp.
    It’s opening Chrome and running the php script but not stopping at breakpoints.
    There appears to be so many references to ports in the configuration. Php server, Php debug -> Xdebug, IDE settingd debugger and the php.ini file. I’ve been trying various combinations and ports for a good four or five hours. Is there a guide anywhere for Xdebug and Wamp?

  • Sperry Rhonstadt

    Help: the validator did not fix my connection problem (PHPStorm 8.0.1). Validator says everything is fine, XDebug running on port 9000 for localhost, and phpinfo says everything is great for xdebug; however, the PHP interpreter setting still says “Debugger: not installed”. To add insult to injury, I’m able to debug nicely in NetBeans with xdebug and these current settings. So please, how is PHPStorm deciding a debugger is not installed?