xDebug Mapping Question

I have a project on Windows.The remote folder is via a Windows mapped drive (in this case U:)

I am debugging a php script from the command line.

When I run the script on the remote server, PHPStorm hears it, stops at the initial line of the code and I can step through the code. I can see the line numbers, but it does not map properly to my local copy, thus I can't set breakpoints, etc. Variables show up correctly.

In my PHPStorm mappings:
Local: C:\Users\xxxxxx\PhpstormProjects\ConnectionsOnActs\web  (which is where the local copy is)
Remote is web (relative to U:\Connections)

I set up the debug to log and got this line:

remote: 'file:///C:/inetpub/wwwroot/121Connectors/web/sendReminders.php' <-> local: '/C:/inetpub/wwwroot/121Connectors/web/sendReminders.php'

Why is it pointing the local location to my remote file? Both the remote entry and the local entry are the same.

Shouldn't the local: setting point to my local copy of the code?

3 comments

Hi there,

1) What is the local path for that script when running on remote server?

2) Any symbolic links / junction points (on local or remote) anywhere in those paths?

3) Show screenshot of your path mappings please: "Settings | PHP | Servers"

0

1. Local path on server is: C:/inetpub/wwwroot/121Connectors/web/sendReminders.php

2. No symbolic links that I know of

3. Settings | PHP | Servers is completely empty (no servers)

0

Then you need to create one.

Heave a look through this (in case you have not seen it yet) -- it's about debugging remote CLI scripts:


All examples there are for Linux .. so you need to find a way how to specify that missing info in Windows OS (the “serverName=SomeName” part) -- you should be able to do this via standard SET command.

Back to "PHP | Servers"
Name: can be anything
Host: should be your serverName as described above (IDE uses it to distinguish between servers -- cannot be empty)
Make sure to tick "Use path mappings"
Then in newly appeared list, provide the path to the project root (on remote server) in right column

0

Please sign in to leave a comment.