You might want to take a look at PDT, it implements path mapping to solve
the problem you are describing.
Dave Kelsey
xdebug-general-bounce[@]lists.xdebug.org wrote on 26/11/2008 10:55:42:
> Hi list,
>
> I'd like to submit a feature request.
>
> At our office, we keep all of our code on a centralized server. This
> means that we generally edit our files over some sort of network
> filesystem, like SMB, NFS or AFP. A side-effect of this is that any
> xdebug GUI client is unable to correctly set breakpoints.
>
> Imagine server A, where I have a file debug.php in
> /home/mathieu/public_html/svnreps/project/ . When I access this file
> from my workstation, the local path I access it over is
> /Volumes/mathieu/public_html/svnreps/project/debug.php. If I use,
> say, MacGDBp or Netbeans, to debug this file while it's running
> through the webserver on Server A and try to set a breakpoint on
> line 15 of debug.php GUI clients will tell xdebug to set a
> breakpoint on file
/Volumes/mathieu/public_html/svnreps/project/debug.php:15.
>
> Net result: the breakpoint is never hit because the path given is
> not a file that xdebug on Server A will ever encounter
> (/Volumes/mathieu as such doesn't exist on Server A).
>
> I had encountered this before when I built XDC http://code.google.
> com/p/xdebugclient ) and XDC counters this problem by offering the
> user a way to rewrite a local path to the remote path automatically.
> But I think it would make sense to implement such a path-rewrite
> system into Xdebug itself, so that any client can benefit from it
> directly. Such a path-rewrite system could take the form of two (.
> htaccess-configurable) settings:
>
> php_value xdebug.path_rewrite_from "/Volumes/mathieu:/Volumes/michiel"
> php_value xdebug.path_rewrite_to "/home/mathieu:/home/michiel"
>
> This definition would define 2 rewrite rules:
>
> - /Volumes/mathieu -> /home/mathieu
> - /Volumes/michiel -> /home/michiel
>
> Xdebug would apply these simple rewrite rules to any path it
> receives from a client like breakpoints, source requests, etc before
> actually using the given path. I suppose you could extend this into
> allowing regex for complex rewrite rules, but I think that simple
> rewrite rules would cover most cases.
>
> Thoughts?
>
> Kind regards,
>
> Mathieu Kooiman
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Received on Wed Nov 26 2008 - 17:59:08 GMT
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST