Debug problems: "remote file path ... is not mapped to any file path in project"

Hi,

I am having problems using the debugger in my phpstorm test phase. I tried several hours to get it to work
but I am completely at loss. Maybe someone can help me.

Here is my configuration:

- latest xampp on windows 7 with document root mapped to a NAS (//diskstation2/web)
- phpstorm runs on the same windows 7 machine
- I enabled xdebug in php.ini in the xampp installation
- the url to the php script to be debugged is "http://localhost/party_princess_shop/index.php"
- in the file system the php file is under "//diskstation2/web/party_princess_shop/index.php" or "Z:/web/party_princess_shop/index.php"

Here is what I tried:

When I start the debugger using zero configuration debugging, I can see that the debugger stops at the breakpoint
I set, but apparently I cannot step through the source code.

I see an error message saying:  "remote file path '/DISKSTATION2/WEB/party_princess_shop/index.php' is not mapped to any file path in project"
or "cannot find file with path ''/DISKSTATION2/WEB/party_princess_shop/index.php' in project ".

When I click on "Resolve Path Mapping Problem" there is not really anything I can do.

What can I do to get the debugging to work?

Thanks,

frimipiso

5 comments
Comment actions Permalink

Hi there,

Please show your existing path mappings.

The way how xdebug sees the file paths is important (especially when symlinks are in use) as xdebug works with final/resolved paths while IDE uses them as is.

0
Comment actions Permalink

Thanks for the fast reply.

I am a newbie and I do not really know how to get the existing path mappings.

This is what I get if I try to fix the path mappings (see attached screenshot).



Attachment(s):
path_mapping_1.jpg
0
Comment actions Permalink

How do you access your project files / what is the path you have used in PhpStorm?

That screenshot does not make much sense to me (the path in both seems to be the same). Looks like you have opened it directly over network (UNC paths) which is not really supported.

I suggest to have a local copy of your files (e.g. C:\Projects\myproject) and work from there (you can setup automatic deployment so that IDE will copy files into another folder/path if required) -- especially if XAMPP is running on local computer.

0
Comment actions Permalink

Thanks for your answer.

Indeed when I created the project I declared the mounted network drive (//diskstation2/web/party_princess_shop directory mounted as "Z:/party_princess_shop) to be the locally stored project files. I thought that a mounted network drive Z: will be treated as local.

So do I have to delete the project and set up the project again? The project files are on the network drive and I would like to have these files as the current up to date version of the project. As far as I understand it, I have to set up automatic deployment to automatically sync the files whenever I save them locally.

So what is the fastest way to get this into order? Delete project in phpstorm and start again from scratch or can I fix this in any other way?

Thanks again,

frimipiso

0
Comment actions Permalink
I thought that a mounted network drive Z: will be treated as local.

In theory it should .. but I see no references to Z:\ drive anywhere on your screenshot -- that's why I have asked for full path.

So what is the fastest way to get this into order? Delete project in phpstorm and start again from scratch

That would be the safest way.

Especially considering that you run XAMPP locally (and not remotely on that NAS (some NAS allows you to install PHP/Apache/MySQL/other software there))

0

Please sign in to leave a comment.