I have a PHP project in Eclipse PDT, which I want to debug using Xdebug remotely. I use a SSH tunnel for the debugger i.e., Eclipse uses a local port. Although this might seem complex, it runs nicely for 2 other projects, and I can attach dbgpClient for the problematic setup. Also Eclipse changes to debugging when I trigger it on the external web server i.e., Xdebug seems to properly attach to Eclipse.
As with the other projects I set up project specific PHP debug settings:
Base Path: /
Base URL: http://project.example.com/
checked: Break at First Line
PHP Server: Project (Debugger Xdebug)
Server
Base URL: http://project.example.com/
Document Root: /local/project/root/web
Debugger
Debugger: Xdebug
Port: tunneled port on localhost
Path Mapping
Server: /remote/project/root
Local: /local/project/root
However, the working projects all have index.php in the project root. The non-working project has index.php in /project/root/web, and the web-server has set the document root to that very directory. Also, /remote/project/root and /local/project/root are different here, but identical for the other 2 projects. I also played around with variations of these settings, but I always came to the same result.
Eclipse seems unable to map the path sent by Xdebug to any path in the workspace i.e., the behavior is identical to debugging a file missing in the workspace. The page is delivered without any break in Eclipse, but I see the red stop debugging button appear. I see the data sent to the browser in Debug Output.
Is there any guidance what all these settings mean? I.e. I guess I get something wrong, here. Is there some log file to check how Eclipse maps filenames received via the Xdebug port to filenames in the workspace?
This post seems to address a similar issue, but also has no solution. This post at least hints at that my approach is not entirely wrong, but it does not state, what correct configuration means.
Update: If I chose /remote/project/root and /local/project/root to be identical i.e. by moving the directory on the server, the everything is just fine. So it seems that the Path Mapping does not do what I expect it to do and how I understood the docs. Is this a bug, or am I just ignorant?