Debug on server with mounted folder

I've a local apache webserver installed in "C:\Program Files\Apache\".
htdocs folder with my projects is also there. For convenience, I've mount a new drive z: which is the same as "C:\Program Files\Apache\htdocs".
I've created a new project with root directory "Z:/test/".

Now I want to debug a test.php file in this project.

I've setup a remote debugging configuration and everything is seems to be ok exept one thing:
When phpstorm accepted incoming connection from xdebug, it loads  "C:\Program Files\Apache\htdocs\test\test.php" file and not the "Z:/test/test.php" and all breakpoints (which was set for Z:/test/test.php) are missing.

Is this a bug or I do something wrong?

Thanks,
Anton

6 comments
Comment actions Permalink

Hello Anton,

Since your project files are in Apache's htdocs folder, I'd suggest to use server of type 'Local' for debugging.

If you need to keep your configuration as it is now (''Mounted' server), please provide the screenshots of File | Settings | Deployment | Mappings tab and your run configration page.

Regards,
Kirill

0
Comment actions Permalink

Actually, it doesn't matter what type of server (local or mounted folder) I'am using.
Here is config screenshots.



Attachment(s):
deployment-mapping.png
deployment-connection.png
run-debug-config.png
0
Comment actions Permalink

Hello Anton,

When using local server, you have to specify real local path - that is 'c:\...htdocs' and not 'Z:\..'.

Regards,
Kirill

0
Comment actions Permalink

Everything will be same.
Maybe I don't describe my problem well enougth.

If I create my project and set the source path as "C:/Program Files..." everything will be ok. But I want to see a short beautiful paths like "Z:\110.ru\www" (see attach, for example), so I've set a source path for project as "Z:\...". But in this case debugging doesn't work properly.



Attachment(s):
illustr.png
0
Comment actions Permalink

Hello Anton,

OK, you leave your project files in Z:\... as they are and set your local path accordingly (Z:\...). Then open run configuration dialog, click 'Server path mappings' button and specify 'Z:\...' as local path on client and 'C:\...Apache\htdocs' as local path on server. This way PhpStorm should transform the paths reported by Xdebug (C:\..) to your project paths (Z:\...).

You can do this one time for template configuration so every new configuration will have this mapping by default.

Regards,
Kirill

0
Comment actions Permalink

Thanks a lot! This solution is exaly what I need.

0

Please sign in to leave a comment.