Remote debugging & (semi) automatic path mapping - possible?


I have the following setup:

  • the project is on a mounted network share (Ubuntu 12), e.g. \var\www\\htdocs\awesomeproject
  • PHPStorm creates a local copy on c:\localpath\awesomeproject
  • remote debugging with Xdebug is enabled and in general working

When PHPSTorm recognizes an incoming request from Xdebug it will prompt a dialogue where I have to assign local paths to network paths, e.g.

c:\localpath\awesomeproject\public\index.php is the same as  \var\www\\htdocs\awesomeproject\public\index.php
c:\localpath\awesomeproject\public\library\vendor\Zend\Stuff\Foo.php is the same as \var\www\\htdocs\awesomeproject\library\vendor\Zend\Stuff\Foo.php

As those MVC Frameworks have LOTS of files this manual mapping gets really annoying while debugging.
I was wondering if there is a way to do it automatically or even semiautomatically
Actually the system could try to gess where a file is when I configured the first assignments.

Question: Is there an easy way to map the files?


Comment actions Permalink

You just need to map top level folders:

c:\localpath\awesomeproject\public\ <-->  \var\www\\htdocs\awesomeproject\public\
c:\localpath\awesomeproject\public\library\ <--> \var\www\\htdocs\awesomeproject\library\

Comment actions Permalink

That sounds truely awesome. Will try it out, thanks a lot!


Please sign in to leave a comment.