PhpStorm throws an error "Remote file path ... is not mapped to any file path in project" in the client-to-API context

Hello!

I'm developing a client application for an API server application. Both apps are hosted locally on my virtual machine. Now I want to debug my client application and get this error:

  • Remote file path '/var/www/my-server-app.loc/public/index.php' is not mapped to any file path in project

Sure, it is not. But it also doesn't need to!

Xdebug is working correctly. PhpStorm debugging is also working correctly (in another project).

My debug settings:

How to get the Debugging working for a API client app?

3 comments
Avatar
Vladimir Luchansky
Comment actions Permalink

Hello,

PhpStorm gets all the info directly from Xdebug that runs within PHP interpreter - therefore if PHP goes through different PHP files, Xdebug gets that info and sends it to PhpStorm.

You disabled all "break" options so PhpStorm will simply ignore all files outside the project you currently work with.

If you want to debug the files outside the project, you need to either add mappings in Languages & Frameworks | PHP | Servers or enable break options.

If you do not want to debug these files then you can ignore the error message - it simply tells us that PHP goes through files located outside the current project.

0
Comment actions Permalink

Thank you for the reply!  Yes, I do not want to debug the files of "my server app" project. But I cannot just ignore the error message. The call to the "server app" cannot be completed and my "client app" doesn't get a response.So it's not only a warning, but something, that actually stops the script execution and the debugging.

0
Comment actions Permalink

Apparently xdebug requires the /var/www/my-server-app.loc/public/index.php file to correctly process debugging call. Any insights on a client app? What's the call to /var/www/my-server-app.loc/public/index.php there?

0

Please sign in to leave a comment.