[xdebug-general] Re: Feature request: implement a path-rewrite system

From: Mauro C. <incastrix[@]yahoo.it>
Date: Wed, 26 Nov 2008 17:08:19 +0000 (GMT)

PHPEclipse too.

Mauro Casciari
Da: Dave Kelsey <d_kelsey[@]uk.ibm.com>
A: Mathieu Kooiman <mathieuk[@]gmail.com>
Cc: xdebug-general[@]lists.xdebug.org; xdebug-general-bounce[@]lists.xdebug.org
Inviato: Mercoledý 26 novembre 2008, 18:28:10
Oggetto: [xdebug-general] Re: Feature request: implement a path-rewrite system

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

> 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
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6

Received on Wed Nov 26 2008 - 18:15:05 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST