PHPStorm and xdebug links

  • phpStorm 2021.3 RC
  • PHP 8.1.0
  • xdebug 3.1.1

I enjoy the fact that there’s was the ability to change xdebug.file_link_format parameter in php.ini to allow integration between xdebug messages, and your IDE.

However, recently, that seems to have broken/changed. The phpstorm:// protocol no longer works.

After much troubleshooting I have it working for projects that use a framework, such as Symfony.

You will now need to utilize the framework.yml ide field,

and enter it as follows:

  1. Comment out the xdebug.file_link_format, as that no longer works…
  2. edit: /config/packages/framework.yaml
    ide: 'jetbrains://php-storm/navigate/reference?project=%env(resolve:PROJECT_NAME)%&path=%%f:%%l'

3. edit: /.env ensure that this matches your project name… otherwise jetbrains won’t be able to find the correct session/window.

PROJECT_NAME="the name of the project"

4. clear cache, and now your links should work.

5. restart apache/nginx if required.

Your Symfony project will allow you to click on filenames (when errors occur) and integrations back to phpStorm.






Leave a Reply

Your email address will not be published. Required fields are marked *