DEV Community

Yuriy Gerasimov
Yuriy Gerasimov

Posted on

PHPStorm picking up wrong index.php

Recently I was setting up Drupal development environment with docksal. I used traditional drupal composer setup (https://github.com/drupal-composer/drupal-project) so drupal is in the /web folder on the server.

I have mapped main root folder in PHP Storm

default mapping

So I was really surprised when I started my debugging session and discovered some weird file being started.

surprise

Looks like PHP Storm tries to find first index.php it can find and then starts session like it is being debugged.

Solution for this is to map folder "web" and actual index.php so PHP Storm can find proper file easier.

proper mapping

explicit index.php

As result proper index.php is displayed as being debugged.

and now nice debugging

Happy debugging!

Top comments (0)