Cannot map symfony cache for xdebug

Greetings,

 

Sometimes (so not everytime), when I use xdebug with PHPStorm, debugger gets triggered, and I can see my variables. But when I click on "step into", it suddently fails and I get the following error:

According to the message, I should fix it by setting up a path mapping. Well, I already did for the project root, but from what I understand from the message, it's rather my cache that cause problem (but maybe I'm wrong). Probably because it is not located in my project folder

 

I am using windows, where PHPStorm is installed. Then I'm using vagrant+virtualbox to create an Ubuntu VM on which I'm working. Please note that my project files are located on my physical (windows) machine, and shared with ubuntu through vagrant configuration. 

And this is why I moved my (symfony) project cache files: As the project files are shared betwen windows and ubuntu, I had a warning message from symfony console that for performance reason, I should move cache out of the shared folder.

Which I did.

But now, how can I map my cache with your "path mapping' tool, since your tool only list folders that are located inside the project root? Again, my cache is NOT located in my project root.

 

..But maybe the problem comes from somewhere else. In the end, I just want to fix this xdebug error.

 

Thanks

 

edit: I realize my message might be a bit hard to understand when it comes to folders. So:

- Symfony project is located in /data/webs/api

- Symfony cache is located in /data/symfony_var/

1
1 comment

Hey,

Basically, I have tried to reproduce a similar by calling a method from file that is located outside the project directory. In my case, Step Into works fine even with the "is not mapped" error warning.

Could you please specify what exactly does not work in your case? 

Also, you may try adding that folder as an extra Content Root in Directories. Not sure about drawbacks of it but it should be possible to configure debug mapping to that folder afterwards.

0

Please sign in to leave a comment.