Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » XDebug JIT Debugging Issue
XDebug JIT Debugging Issue [message #88146] Sat, 03 January 2009 10:58 Go to next message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
This is mainly for you Dave as you seem to be doing most of the fixing
up of XDebug stuff within PDT. I noticed a problem today with the JIT
debugging and how it figures out which file to use.

The problem occurs around how the file is loaded into the Eclipse editor
once you specify the path mapping. Hopefully this will be clear when I
show you my scenario.

1. New PDT project (PDT 2.0GA) for a fresh Drupal install (not really
important other than it is a PHP web application)
2. Firefox plugin for XDebug (just used to set the cookies so that a
remote debug session can start)
3. Eclipse is running with the project open. Start a remote debug
session and an Eclipse dialog pops up saying a file within the servers
path of /home/testing/wwwroot/index.php is needing to be mapped. By
default it shows the index.php from within my project.
4. I select it and the file opens up and stops on line 1.

Here is where there is problems. The files being opened are absolute
paths within my local machine. In this case my local machine has the
file at e:\testing\wwwroot\index.php. The Eclipse project is at the
wwwroot level. I can step through the code and step into functions and
do some of the basic debugging. The thing is because the file is opened
absolutely (as if it isn't part of the eclipse project) I am not able to
F3 when selecting a function and I can make breakpoints properly because
the breakpoint shows the full path in the breakpoint view. Now if I am
to open the same file within the project and set a breakpoint there then
the code will stop and show in the absolute pathed file that is open.

Not sure how I can explain it other than that so let me know if you need
more information. From what I can tell the JIT for XDebug needs to
somehow open the files as if they are within the Eclipse project and not
absolutely or else they loose some of the PDT functionality.

--
Shawn Clark

P.S. sorry if my grammar is bad tonight. Typing this up late before
calling it a night as I didn't want to forget to post it. :)
Re: XDebug JIT Debugging Issue [message #88292 is a reply to message #88146] Mon, 05 January 2009 15:46 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
Hi Shawn, this behaviour is due to the Remote Session initiation only having a dummy source locator
defined to it. The source locator is used to locate and open the appropriate source file and it
fails to find the file (because it is only a dummy source locator for this session) so falls back on
the remapped file (by the path mapper) and opens that absolutely instead.

Could you raise a bugzilla, https://bugs.eclipse.org/bugs/enter_bug.cgi?product=PDT , to request an
enhancement to this ?

Many thanks for looking into this, your explanation and determination of the cause were spot on.

Cheers
Dave Kelsey

Shawn Clark wrote:
> This is mainly for you Dave as you seem to be doing most of the fixing
> up of XDebug stuff within PDT. I noticed a problem today with the JIT
> debugging and how it figures out which file to use.
>
> The problem occurs around how the file is loaded into the Eclipse editor
> once you specify the path mapping. Hopefully this will be clear when I
> show you my scenario.
>
> 1. New PDT project (PDT 2.0GA) for a fresh Drupal install (not really
> important other than it is a PHP web application)
> 2. Firefox plugin for XDebug (just used to set the cookies so that a
> remote debug session can start)
> 3. Eclipse is running with the project open. Start a remote debug
> session and an Eclipse dialog pops up saying a file within the servers
> path of /home/testing/wwwroot/index.php is needing to be mapped. By
> default it shows the index.php from within my project.
> 4. I select it and the file opens up and stops on line 1.
>
> Here is where there is problems. The files being opened are absolute
> paths within my local machine. In this case my local machine has the
> file at e:\testing\wwwroot\index.php. The Eclipse project is at the
> wwwroot level. I can step through the code and step into functions and
> do some of the basic debugging. The thing is because the file is opened
> absolutely (as if it isn't part of the eclipse project) I am not able to
> F3 when selecting a function and I can make breakpoints properly because
> the breakpoint shows the full path in the breakpoint view. Now if I am
> to open the same file within the project and set a breakpoint there then
> the code will stop and show in the absolute pathed file that is open.
>
> Not sure how I can explain it other than that so let me know if you need
> more information. From what I can tell the JIT for XDebug needs to
> somehow open the files as if they are within the Eclipse project and not
> absolutely or else they loose some of the PDT functionality.
>
> --
> Shawn Clark
>
> P.S. sorry if my grammar is bad tonight. Typing this up late before
> calling it a night as I didn't want to forget to post it. :)
Re: XDebug JIT Debugging Issue [message #88338 is a reply to message #88292] Mon, 05 January 2009 19:36 Go to previous message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
For Reference:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=259988

--
Shawn Clark

Dave Kelsey wrote:
> Hi Shawn, this behaviour is due to the Remote Session initiation only
> having a dummy source locator defined to it. The source locator is used
> to locate and open the appropriate source file and it fails to find the
> file (because it is only a dummy source locator for this session) so
> falls back on the remapped file (by the path mapper) and opens that
> absolutely instead.
>
> Could you raise a bugzilla,
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=PDT , to request an
> enhancement to this ?
>
> Many thanks for looking into this, your explanation and determination of
> the cause were spot on.
>
> Cheers
> Dave Kelsey
>
> Shawn Clark wrote:
>> This is mainly for you Dave as you seem to be doing most of the fixing
>> up of XDebug stuff within PDT. I noticed a problem today with the JIT
>> debugging and how it figures out which file to use.
>>
>> The problem occurs around how the file is loaded into the Eclipse
>> editor once you specify the path mapping. Hopefully this will be clear
>> when I show you my scenario.
>>
>> 1. New PDT project (PDT 2.0GA) for a fresh Drupal install (not really
>> important other than it is a PHP web application)
>> 2. Firefox plugin for XDebug (just used to set the cookies so that a
>> remote debug session can start)
>> 3. Eclipse is running with the project open. Start a remote debug
>> session and an Eclipse dialog pops up saying a file within the servers
>> path of /home/testing/wwwroot/index.php is needing to be mapped. By
>> default it shows the index.php from within my project.
>> 4. I select it and the file opens up and stops on line 1.
>>
>> Here is where there is problems. The files being opened are absolute
>> paths within my local machine. In this case my local machine has the
>> file at e:\testing\wwwroot\index.php. The Eclipse project is at the
>> wwwroot level. I can step through the code and step into functions and
>> do some of the basic debugging. The thing is because the file is
>> opened absolutely (as if it isn't part of the eclipse project) I am
>> not able to F3 when selecting a function and I can make breakpoints
>> properly because the breakpoint shows the full path in the breakpoint
>> view. Now if I am to open the same file within the project and set a
>> breakpoint there then the code will stop and show in the absolute
>> pathed file that is open.
>>
>> Not sure how I can explain it other than that so let me know if you
>> need more information. From what I can tell the JIT for XDebug needs
>> to somehow open the files as if they are within the Eclipse project
>> and not absolutely or else they loose some of the PDT functionality.
>>
>> --
>> Shawn Clark
>>
>> P.S. sorry if my grammar is bad tonight. Typing this up late before
>> calling it a night as I didn't want to forget to post it. :)
Previous Topic:PDT 2.0, Hiding .svn folders
Next Topic:Where can I download ZendDebugger v5.2.15 ?
Goto Forum:
  


Current Time: Sat Oct 12 17:13:37 GMT 2024

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

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

Back to the top