Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Xdebug: files with same name
Xdebug: files with same name [message #2869] Sat, 03 March 2007 12:51 Go to next message
Eclipse UserFriend
Originally posted by: johan.bobsworld.be

Hello

In my project I have an index.php in the root directory and an index.php
in a subfolder named test. When I set a breakpoint in the test/index.php
and run the script, xdebug takes me to the debug screen of eclipse, but
the sourcefile of the index.php in the root of the project is shown
instead of the test/index.php.
Have the same problem with classes that have the same name, but are in
another folder.

Is this a known bug? Or is something wrong with the configuration of my
project?

Thanks in advance.
Johan Vandeweerd
Re: Xdebug: files with same name [message #2924 is a reply to message #2869] Mon, 05 March 2007 11:26 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
A quick test works for me if I have an index.php and a test/index.php an I
do a web launch for index.php I enter that version and if I launch on /test/index.php
I use that copy. In my case I am not using the path mapper version and my apache
document root is pointing to my workspace.


Are you using the path mapper version ?
where are you pointing your apache document root to ?

Dave Kelsey



Johan Vandeweerd wrote:
> Hello
>
> In my project I have an index.php in the root directory and an index.php
> in a subfolder named test. When I set a breakpoint in the test/index.php
> and run the script, xdebug takes me to the debug screen of eclipse, but
> the sourcefile of the index.php in the root of the project is shown
> instead of the test/index.php.
> Have the same problem with classes that have the same name, but are in
> another folder.
>
> Is this a known bug? Or is something wrong with the configuration of my
> project?
>
> Thanks in advance.
> Johan Vandeweerd
Re: Xdebug: files with same name [message #2942 is a reply to message #2924] Mon, 05 March 2007 21:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.bobsworld.be

Hi

Yes, I'm using path mapper. I installed PDT 0.7 20070130 with xdebug
0.1.3.logik

My desktop pc is windows xp and my apache server is on debian. The
document root is shared with samba.
Doc root is in /var/www and shared and mounted as j: drive.

I've mapped j:/someproject to /var/www/someproject. Both with forward
slash and without a slash at the end.
The rest of debugging works like a charm (thanks for that btw ;-).

Regards
Johan Vandeweerd


Dave Kelsey wrote:
> A quick test works for me if I have an index.php and a test/index.php an I
> do a web launch for index.php I enter that version and if I launch on
> /test/index.php
> I use that copy. In my case I am not using the path mapper version and
> my apache
> document root is pointing to my workspace.
>
>
> Are you using the path mapper version ?
> where are you pointing your apache document root to ?
>
> Dave Kelsey
>
>
>
> Johan Vandeweerd wrote:
>> Hello
>>
>> In my project I have an index.php in the root directory and an
>> index.php in a subfolder named test. When I set a breakpoint in the
>> test/index.php and run the script, xdebug takes me to the debug screen
>> of eclipse, but the sourcefile of the index.php in the root of the
>> project is shown instead of the test/index.php.
>> Have the same problem with classes that have the same name, but are in
>> another folder.
>>
>> Is this a known bug? Or is something wrong with the configuration of
>> my project?
>>
>> Thanks in advance.
>> Johan Vandeweerd
Re: Xdebug: files with same name [message #2958 is a reply to message #2942] Tue, 06 March 2007 10:10 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
Hi Johan, It is probably an issue with the path mapper version. Hopefully the
owner of that code can look into it. Sorry I can't help further.

Just out of curiosity, how many different mappings do you use on a single launch ?

Dave Kelsey


Johan Vandeweerd wrote:
> Hi
>
> Yes, I'm using path mapper. I installed PDT 0.7 20070130 with xdebug
> 0.1.3.logik
>
> My desktop pc is windows xp and my apache server is on debian. The
> document root is shared with samba.
> Doc root is in /var/www and shared and mounted as j: drive.
>
> I've mapped j:/someproject to /var/www/someproject. Both with forward
> slash and without a slash at the end.
> The rest of debugging works like a charm (thanks for that btw ;-).
>
> Regards
> Johan Vandeweerd
>
>
> Dave Kelsey wrote:
>> A quick test works for me if I have an index.php and a test/index.php
>> an I
>> do a web launch for index.php I enter that version and if I launch on
>> /test/index.php
>> I use that copy. In my case I am not using the path mapper version and
>> my apache
>> document root is pointing to my workspace.
>>
>>
>> Are you using the path mapper version ?
>> where are you pointing your apache document root to ?
>>
>> Dave Kelsey
>>
>>
>>
>> Johan Vandeweerd wrote:
>>> Hello
>>>
>>> In my project I have an index.php in the root directory and an
>>> index.php in a subfolder named test. When I set a breakpoint in the
>>> test/index.php and run the script, xdebug takes me to the debug
>>> screen of eclipse, but the sourcefile of the index.php in the root of
>>> the project is shown instead of the test/index.php.
>>> Have the same problem with classes that have the same name, but are
>>> in another folder.
>>>
>>> Is this a known bug? Or is something wrong with the configuration of
>>> my project?
>>>
>>> Thanks in advance.
>>> Johan Vandeweerd
Re: Xdebug: files with same name [message #2975 is a reply to message #2958] Tue, 06 March 2007 14:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.bobsworld.be

Hello

Only one. Currently I'm only working on one project and the root folder
of that project is mapped.
Are you planning to implement a workaround/fix for the mapping problem
or is it going to stay with the hack (no offence, I'm very happy with
the path mapper)?

Regards
Johan Vandeweerd


Dave Kelsey wrote:
> Hi Johan, It is probably an issue with the path mapper version.
> Hopefully the
> owner of that code can look into it. Sorry I can't help further.
>
> Just out of curiosity, how many different mappings do you use on a
> single launch ?
>
> Dave Kelsey
>
>
> Johan Vandeweerd wrote:
>> Hi
>>
>> Yes, I'm using path mapper. I installed PDT 0.7 20070130 with xdebug
>> 0.1.3.logik
>>
>> My desktop pc is windows xp and my apache server is on debian. The
>> document root is shared with samba.
>> Doc root is in /var/www and shared and mounted as j: drive.
>>
>> I've mapped j:/someproject to /var/www/someproject. Both with forward
>> slash and without a slash at the end.
>> The rest of debugging works like a charm (thanks for that btw ;-).
>>
>> Regards
>> Johan Vandeweerd
>>
>>
>> Dave Kelsey wrote:
>>> A quick test works for me if I have an index.php and a test/index.php
>>> an I
>>> do a web launch for index.php I enter that version and if I launch on
>>> /test/index.php
>>> I use that copy. In my case I am not using the path mapper version
>>> and my apache
>>> document root is pointing to my workspace.
>>>
>>>
>>> Are you using the path mapper version ?
>>> where are you pointing your apache document root to ?
>>>
>>> Dave Kelsey
>>>
>>>
>>>
>>> Johan Vandeweerd wrote:
>>>> Hello
>>>>
>>>> In my project I have an index.php in the root directory and an
>>>> index.php in a subfolder named test. When I set a breakpoint in the
>>>> test/index.php and run the script, xdebug takes me to the debug
>>>> screen of eclipse, but the sourcefile of the index.php in the root
>>>> of the project is shown instead of the test/index.php.
>>>> Have the same problem with classes that have the same name, but are
>>>> in another folder.
>>>>
>>>> Is this a known bug? Or is something wrong with the configuration of
>>>> my project?
>>>>
>>>> Thanks in advance.
>>>> Johan Vandeweerd
Re: Xdebug: files with same name [message #3009 is a reply to message #2975] Tue, 06 March 2007 15:29 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
No I won't be trying to fix this issue with the path mapper version. You may
want to contact the author of that code if you need a fix soon.

I have been looking at providing an extension point which will allow a path
mapper to be plugged into the XDebug support, and I will have a sample mapper
which would allow you to define the location of your apache document root
and will map your project to the apache document root. Then people can create
their own mappers which are more complex.

I would hope to make this version available soon after the 0.7 version of
PDT is available.

Dave Kelsey

Johan Vandeweerd wrote:
> Hello
>
> Only one. Currently I'm only working on one project and the root folder
> of that project is mapped.
> Are you planning to implement a workaround/fix for the mapping problem
> or is it going to stay with the hack (no offence, I'm very happy with
> the path mapper)?
>
> Regards
> Johan Vandeweerd
>
>
> Dave Kelsey wrote:
>> Hi Johan, It is probably an issue with the path mapper version.
>> Hopefully the
>> owner of that code can look into it. Sorry I can't help further.
>>
>> Just out of curiosity, how many different mappings do you use on a
>> single launch ?
>>
>> Dave Kelsey
>>
>>
>> Johan Vandeweerd wrote:
>>> Hi
>>>
>>> Yes, I'm using path mapper. I installed PDT 0.7 20070130 with xdebug
>>> 0.1.3.logik
>>>
>>> My desktop pc is windows xp and my apache server is on debian. The
>>> document root is shared with samba.
>>> Doc root is in /var/www and shared and mounted as j: drive.
>>>
>>> I've mapped j:/someproject to /var/www/someproject. Both with forward
>>> slash and without a slash at the end.
>>> The rest of debugging works like a charm (thanks for that btw ;-).
>>>
>>> Regards
>>> Johan Vandeweerd
>>>
>>>
>>> Dave Kelsey wrote:
>>>> A quick test works for me if I have an index.php and a
>>>> test/index.php an I
>>>> do a web launch for index.php I enter that version and if I launch
>>>> on /test/index.php
>>>> I use that copy. In my case I am not using the path mapper version
>>>> and my apache
>>>> document root is pointing to my workspace.
>>>>
>>>>
>>>> Are you using the path mapper version ?
>>>> where are you pointing your apache document root to ?
>>>>
>>>> Dave Kelsey
>>>>
>>>>
>>>>
>>>> Johan Vandeweerd wrote:
>>>>> Hello
>>>>>
>>>>> In my project I have an index.php in the root directory and an
>>>>> index.php in a subfolder named test. When I set a breakpoint in the
>>>>> test/index.php and run the script, xdebug takes me to the debug
>>>>> screen of eclipse, but the sourcefile of the index.php in the root
>>>>> of the project is shown instead of the test/index.php.
>>>>> Have the same problem with classes that have the same name, but are
>>>>> in another folder.
>>>>>
>>>>> Is this a known bug? Or is something wrong with the configuration
>>>>> of my project?
>>>>>
>>>>> Thanks in advance.
>>>>> Johan Vandeweerd
Re: Xdebug: files with same name [message #9079 is a reply to message #2869] Fri, 23 March 2007 13:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dominic.clifton.gr-tech.net

There is actually a workaround for this until a proper solution is
implemented:

* Start an xdebug session
* Switch to the "PHP Debug" perspective
* In The "Debug" view, right click the "PHP Web Script with XDebug" (or
whatever type of debugger you're using) and from the context menu that
appears select "Edit source lookup..".
* Tick "Search for duplicate files on the path"

Now whenever you hit a breakpoint in a file that has the same name as
another file you'll be prompted to select the right file.

Not ideal, but it does appear to work ok for me, hope this helps.

Dom
Re: Xdebug: files with same name [message #11997 is a reply to message #2869] Tue, 03 April 2007 16:14 Go to previous messageGo to next message
Maxim Tikhonov is currently offline Maxim TikhonovFriend
Messages: 1
Registered: July 2009
Junior Member
Hi, I am the author of the Path Mapper, and I have been away on the
holiday.

Yeah it is know issue (if you can call it that). I think the issue was
that eclipse opens the file by the name only, so it opens the first file
of that name it sees.

What I have done is adjusted the source lookups, so that the folder I want
overrides the default one.

I will try to see if something can be done to fix the issue (from what I
remember it wasn't an easy fix, or possible, otherwise I would have done
it).
Re: Xdebug: files with same name [message #12036 is a reply to message #11997] Wed, 04 April 2007 08:20 Go to previous message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
Max, the new version of XDebug will have an extension point which will
sort out this issue for you. You will need to port your port mapper to
the interface but that means you want need to patch the base code.

I am waiting for the next stable release from pdt and I will port the code
to that version and release it

Dave Kelsey

Maxim Tikhonov wrote:
> Hi, I am the author of the Path Mapper, and I have been away on the
> holiday.
>
> Yeah it is know issue (if you can call it that). I think the issue was
> that eclipse opens the file by the name only, so it opens the first file
> of that name it sees.
>
> What I have done is adjusted the source lookups, so that the folder I
> want overrides the default one.
>
> I will try to see if something can be done to fix the issue (from what I
> remember it wasn't an easy fix, or possible, otherwise I would have done
> it).
>
Previous Topic:Strange auto formatting bug
Next Topic:Soething for a begginer
Goto Forum:
  


Current Time: Wed Feb 05 09:48:51 GMT 2025

Powered by FUDForum. Page generated in 0.04957 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top