PhpStorm 2019.2.3, Xdebug 2.6.1, path mappings for Laravel App

Running PhpStorm 2019.2.3, Xdebug 2.6.1, PHP 7.2, Apache 2.4. 

I'm trying to get remote debugging going. I have the versions above, with PhpStorm on Windows, and the rest on the Linux server.  I'm running tcpdump on the receiving end, and I can see packets addressed to port 9000, as well as the appearance of a port 9000 listener in Netstat. So all the pieces seem to be there, but I get the dreaded Debug Session was finished without being paused.  My path mappings are as follows:

file://C:/Users/ed.greenberg/Documents/GIT_Repository   /www/appcollect /var/ww/html/appcollect


file://C:/Users/ed.greenberg/Documents/GIT_Repository/www/appcollect/public/index.php /var/www/html/appcollect/public/index.php

I can breakpoint in public/index.php, but not anywhere else. 

I added this mapping, and was successful in breakpointing in that file:

file://C:/Users/ed.greenberg/Documents/GIT_Repository/www/appcollect/app/Http/Controllers/LandingPageController.php    /var/www/html/appcollect/app/Http/Controllers/LandingPageController.php

Do I have to manually fill out path mapping entries for each individual file, or shouldn't they inherit? 


Ed Greenberg

Comment actions Permalink

Unfortunately forum broke formatting of file mappings. Could you please attach a screenshot that would illustrate them? Is C:/Users/ed.greenberg/Documents/GIT_Repository a root of you PhpStorm project?

Comment actions Permalink

Thank you Dimitri,  Indeed, Documents/GIT_Repository/xxx is where the code for project xxx lives on the PHPStorm machine. This corresponds to /var/www/html/xxx which is the document root.  

The good news is that a while after I posted this, I got it working. Unfortuately, I'm not 100% sure how. (The price of PHPStorm being so good is that it's config is very complex :))

As near as I can tell, all I have under Tools, Deployment, Configuration Mappings is:

Local Path: C:\Users\ed.greenberg\Documents\GIT_Repository\www\appcollect

Deployment Path: /var/www/html/appcollect

Web Path: /

I removed the mapping of C:\Users\ed.greenberg\Documents\GIT_Repository\www\appcollect\public\index.php to /var/www/html/appcollect/public/index.php and that started everything working underneath my first mapping above. 

Anyway, I'm happy with this.




Please sign in to leave a comment.