Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » XDebug and Path Mapping in RC1
XDebug and Path Mapping in RC1 [message #50325] Tue, 11 September 2007 15:41 Go to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
RC1 now contains an automated ability to map paths when debugging web scripts for xdebug.
This means you can now debug remote server scripts within PDT.

Dave Kelsey
Re: XDebug and Path Mapping in RC1 [message #50353 is a reply to message #50325] Tue, 11 September 2007 19:17 Go to previous messageGo to next message
Jacob Weber is currently offline Jacob WeberFriend
Messages: 39
Registered: July 2009
Member
"Dave Kelsey" <dkel50@hotmail.com> wrote in message
news:fc6cuh$hbo$1@build.eclipse.org...
> RC1 now contains an automated ability to map paths when debugging web
> scripts for xdebug. This means you can now debug remote server scripts
> within PDT.

I'm seeing some inconsistent behavior with xdebug, but maybe I'm doing it
wrong. In Debug > PHP Web Page > Server, what's the relationship between
File/Project and URL? Or more specifically, what exactly does the
File/Project setting do?

I've found that if they both refer to the same PHP file, the debug session
starts correctly, and the server sends the XDEBUG_SESSION cookie back. From
then on, I'm able to set breakpoints in other files, go to other URLs in the
browser, and the debugger will become active.

But it doesn't seem to work if they refer to different files. For example,
if File/Project just has a project name in it, Eclipse won't debug anything.
And if URL contains a URL that redirects somewhere else on the same server,
it also doesn't work. In both cases, the XDEBUG_SESSION cookie *does* get
sent back to the browser, but Eclipse must be ignoring it.

Any ideas?
Jacob
Re: XDebug and Path Mapping in RC1 [message #50380 is a reply to message #50353] Tue, 11 September 2007 19:28 Go to previous messageGo to next message
Jacob Weber is currently offline Jacob WeberFriend
Messages: 39
Registered: July 2009
Member
Also, what is the effect of the "PHP Server" setting? I have it configured
to point to a nonsense URL and it seems to work fine. Is this only relevant
if you're publishing files to the server? I can see that it's used to
auto-generate the URLs, but I'm not using that feature, since it doesn't
know how my workspace files are mapped to URLs.
Thanks,
Jacob


"Jacob Weber" <jacob@jacobweber.com> wrote:
> I'm seeing some inconsistent behavior with xdebug, but maybe I'm doing it
> wrong. In Debug > PHP Web Page > Server, what's the relationship between
> File/Project and URL? Or more specifically, what exactly does the
> File/Project setting do?
Re: XDebug and Path Mapping in RC1 [message #50685 is a reply to message #50353] Wed, 12 September 2007 11:12 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
In the launch, the URL defines the initial URL to be invoked when you
want to debug your web environment. Once debugging you then control the
application from the web browser.

If your web server document root points to your PDT workspace, then the
content of the File/Project field is not important.

If however your server document root points to a different location and
you have a copy of the scripts in your PDT workspace, then the File/Project
field is very important as it is required to setup the path mapping information
internally between the scripts which are running on the web server and
the where these scripts exist within your PDT workspace. In this scenario the
URL you specify will invoke the initial PHP script. You specify in File / Project
this script that is located in your PDT workspace so that path mapping will
work. (specifying just a project will not work, although it could be made to work
in the future as an enhancement).

I hope to publish this info in a better place at some point, but I hope it
helps you understand what is going on.

Dave Kelsey

Jacob Weber wrote:
> "Dave Kelsey" <dkel50@hotmail.com> wrote in message
> news:fc6cuh$hbo$1@build.eclipse.org...
>> RC1 now contains an automated ability to map paths when debugging web
>> scripts for xdebug. This means you can now debug remote server scripts
>> within PDT.
>
> I'm seeing some inconsistent behavior with xdebug, but maybe I'm doing it
> wrong. In Debug > PHP Web Page > Server, what's the relationship between
> File/Project and URL? Or more specifically, what exactly does the
> File/Project setting do?
>
> I've found that if they both refer to the same PHP file, the debug session
> starts correctly, and the server sends the XDEBUG_SESSION cookie back. From
> then on, I'm able to set breakpoints in other files, go to other URLs in the
> browser, and the debugger will become active.
>
> But it doesn't seem to work if they refer to different files. For example,
> if File/Project just has a project name in it, Eclipse won't debug anything.
> And if URL contains a URL that redirects somewhere else on the same server,
> it also doesn't work. In both cases, the XDEBUG_SESSION cookie *does* get
> sent back to the browser, but Eclipse must be ignoring it.
>
> Any ideas?
> Jacob
>
>
Re: XDebug and Path Mapping in RC1 [message #50998 is a reply to message #50685] Wed, 12 September 2007 16:14 Go to previous messageGo to next message
Jacob Weber is currently offline Jacob WeberFriend
Messages: 39
Registered: July 2009
Member
Thanks Dave, that's very helpful. Maybe it would be more clear if you
renamed these fields to something like "Initial URL" and "Workspace File
Returned By Initial URL". Something that emphasizes that these must be the
same file.

What about PHP Server? Is that just used for publishing and auto-generating
the URL field?

Thanks. This is a great tool!
Jacob


"Dave Kelsey" <dkel50@hotmail.com> wrote in message
news:fc8hik$97o$1@build.eclipse.org...
> In the launch, the URL defines the initial URL to be invoked when you
> want to debug your web environment. Once debugging you then control the
> application from the web browser.
>
> If your web server document root points to your PDT workspace, then the
> content of the File/Project field is not important.
>
> If however your server document root points to a different location and
> you have a copy of the scripts in your PDT workspace, then the
> File/Project
> field is very important as it is required to setup the path mapping
> information
> internally between the scripts which are running on the web server and
> the where these scripts exist within your PDT workspace. In this scenario
> the
> URL you specify will invoke the initial PHP script. You specify in File /
> Project
> this script that is located in your PDT workspace so that path mapping
> will
> work. (specifying just a project will not work, although it could be made
> to work
> in the future as an enhancement).
Re: XDebug and Path Mapping in RC1 [message #51026 is a reply to message #50998] Wed, 12 September 2007 16:33 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
Hi Jacob, the launch page is a common page for multiple debuggers so the
meaning for Xdebug might not be the same for zend and other debuggers.

The PHP Server entry I guess is used for publishing and I would have thought
that the URL definition for the server is used by the auto generation of the
URL in the launch.

Cheers
Dave Kelsey


Jacob Weber wrote:
> Thanks Dave, that's very helpful. Maybe it would be more clear if you
> renamed these fields to something like "Initial URL" and "Workspace File
> Returned By Initial URL". Something that emphasizes that these must be the
> same file.
>
> What about PHP Server? Is that just used for publishing and auto-generating
> the URL field?
>
> Thanks. This is a great tool!
> Jacob
>
>
> "Dave Kelsey" <dkel50@hotmail.com> wrote in message
> news:fc8hik$97o$1@build.eclipse.org...
>> In the launch, the URL defines the initial URL to be invoked when you
>> want to debug your web environment. Once debugging you then control the
>> application from the web browser.
>>
>> If your web server document root points to your PDT workspace, then the
>> content of the File/Project field is not important.
>>
>> If however your server document root points to a different location and
>> you have a copy of the scripts in your PDT workspace, then the
>> File/Project
>> field is very important as it is required to setup the path mapping
>> information
>> internally between the scripts which are running on the web server and
>> the where these scripts exist within your PDT workspace. In this scenario
>> the
>> URL you specify will invoke the initial PHP script. You specify in File /
>> Project
>> this script that is located in your PDT workspace so that path mapping
>> will
>> work. (specifying just a project will not work, although it could be made
>> to work
>> in the future as an enhancement).
>
>
Re: XDebug and Path Mapping in RC1 [message #51749 is a reply to message #50685] Fri, 14 September 2007 14:04 Go to previous messageGo to next message
Marijn is currently offline MarijnFriend
Messages: 19
Registered: July 2009
Junior Member
Yey! Great work to add path mapping on this short notice :D.

Unfortunately it's not yet working for me :(. The weird thing is that
initially it did work. As far as I know I didn't change any settings
between the last working run and the one after that.

I have set my File / Project to: /project/trunk/index.php
Break at First Line is on.
The URL is auto generated to http://remote/trunk/index.php

The thing though is that index.php does include files outside of the
project however on my initial working run I'd just get a message stating
that the file could not be found.

Pretty weird. Is there a possibility to view some logs somewhere and
debug information to find out what exactly happens.

Regards,

Marijn.

Dave Kelsey wrote:
> In the launch, the URL defines the initial URL to be invoked when you
> want to debug your web environment. Once debugging you then control the
> application from the web browser.
>
> If your web server document root points to your PDT workspace, then the
> content of the File/Project field is not important.
>
> If however your server document root points to a different location and
> you have a copy of the scripts in your PDT workspace, then the File/Project
> field is very important as it is required to setup the path mapping
> information
> internally between the scripts which are running on the web server and
> the where these scripts exist within your PDT workspace. In this
> scenario the
> URL you specify will invoke the initial PHP script. You specify in File
> / Project
> this script that is located in your PDT workspace so that path mapping will
> work. (specifying just a project will not work, although it could be
> made to work
> in the future as an enhancement).
>
> I hope to publish this info in a better place at some point, but I hope it
> helps you understand what is going on.
>
> Dave Kelsey
>
> Jacob Weber wrote:
>> "Dave Kelsey" <dkel50@hotmail.com> wrote in message
>> news:fc6cuh$hbo$1@build.eclipse.org...
>>> RC1 now contains an automated ability to map paths when debugging web
>>> scripts for xdebug. This means you can now debug remote server
>>> scripts within PDT.
>>
>> I'm seeing some inconsistent behavior with xdebug, but maybe I'm doing
>> it wrong. In Debug > PHP Web Page > Server, what's the relationship
>> between File/Project and URL? Or more specifically, what exactly does
>> the File/Project setting do?
>>
>> I've found that if they both refer to the same PHP file, the debug
>> session starts correctly, and the server sends the XDEBUG_SESSION
>> cookie back. From then on, I'm able to set breakpoints in other files,
>> go to other URLs in the browser, and the debugger will become active.
>>
>> But it doesn't seem to work if they refer to different files. For
>> example, if File/Project just has a project name in it, Eclipse won't
>> debug anything. And if URL contains a URL that redirects somewhere
>> else on the same server, it also doesn't work. In both cases, the
>> XDEBUG_SESSION cookie *does* get sent back to the browser, but Eclipse
>> must be ignoring it.
>>
>> Any ideas?
>> Jacob
>>
>>
Re: XDebug and Path Mapping in RC1 [message #51781 is a reply to message #51749] Fri, 14 September 2007 16:21 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
No, there is no way to debug the interactions currently without
downloading the source and running in a runtime workbench.

Could you provide some more details about your environment, ie
web server, and platform, PDT platform etc.

Cheers


Marijn van Zon wrote:
> Yey! Great work to add path mapping on this short notice :D.
>
> Unfortunately it's not yet working for me :(. The weird thing is that
> initially it did work. As far as I know I didn't change any settings
> between the last working run and the one after that.
>
> I have set my File / Project to: /project/trunk/index.php
> Break at First Line is on.
> The URL is auto generated to http://remote/trunk/index.php
>
> The thing though is that index.php does include files outside of the
> project however on my initial working run I'd just get a message stating
> that the file could not be found.
>
> Pretty weird. Is there a possibility to view some logs somewhere and
> debug information to find out what exactly happens.
>
> Regards,
>
> Marijn.
>
> Dave Kelsey wrote:
>> In the launch, the URL defines the initial URL to be invoked when you
>> want to debug your web environment. Once debugging you then control the
>> application from the web browser.
>>
>> If your web server document root points to your PDT workspace, then the
>> content of the File/Project field is not important.
>>
>> If however your server document root points to a different location and
>> you have a copy of the scripts in your PDT workspace, then the
>> File/Project
>> field is very important as it is required to setup the path mapping
>> information
>> internally between the scripts which are running on the web server and
>> the where these scripts exist within your PDT workspace. In this
>> scenario the
>> URL you specify will invoke the initial PHP script. You specify in
>> File / Project
>> this script that is located in your PDT workspace so that path mapping
>> will
>> work. (specifying just a project will not work, although it could be
>> made to work
>> in the future as an enhancement).
>>
>> I hope to publish this info in a better place at some point, but I
>> hope it
>> helps you understand what is going on.
>>
>> Dave Kelsey
>>
>> Jacob Weber wrote:
>>> "Dave Kelsey" <dkel50@hotmail.com> wrote in message
>>> news:fc6cuh$hbo$1@build.eclipse.org...
>>>> RC1 now contains an automated ability to map paths when debugging
>>>> web scripts for xdebug. This means you can now debug remote server
>>>> scripts within PDT.
>>>
>>> I'm seeing some inconsistent behavior with xdebug, but maybe I'm
>>> doing it wrong. In Debug > PHP Web Page > Server, what's the
>>> relationship between File/Project and URL? Or more specifically, what
>>> exactly does the File/Project setting do?
>>>
>>> I've found that if they both refer to the same PHP file, the debug
>>> session starts correctly, and the server sends the XDEBUG_SESSION
>>> cookie back. From then on, I'm able to set breakpoints in other
>>> files, go to other URLs in the browser, and the debugger will become
>>> active.
>>>
>>> But it doesn't seem to work if they refer to different files. For
>>> example, if File/Project just has a project name in it, Eclipse won't
>>> debug anything. And if URL contains a URL that redirects somewhere
>>> else on the same server, it also doesn't work. In both cases, the
>>> XDEBUG_SESSION cookie *does* get sent back to the browser, but
>>> Eclipse must be ignoring it.
>>>
>>> Any ideas?
>>> Jacob
>>>
>>>
Re: XDebug and Path Mapping in RC1 [message #52945 is a reply to message #51749] Wed, 19 September 2007 08:01 Go to previous message
Marijn is currently offline MarijnFriend
Messages: 19
Registered: July 2009
Junior Member
Actually sending the email was a mistake. I wanted to reply to the newsgroup
but only afterwards found out that I replied to you directly :). Anyways the
sysadmin of the server is on vacation at the moment and I have to wait until
he gets back (+/- two weeks :\) before xdebug can be upgraded. I think I did
locate part of the problem though. The server switches to https and I had
http configured. After changing that in the Web Server settings debug was
working again however still now fully. If I add a breakpoint debugging stops
working. Firefox hangs on "Waiting for server..." and the debugger doesn't
react. The same happens when I then remove the breakpoint. I have to restart
Eclipse to get debugging to work again.

On a positive note the path mapping works very well.

The PHP application is a collection of modules and I have a seperate project
for each of the modules as to be able to close projects if I don't need them
so that the Tasks and Problems are not cluttered, however the cross project
includes are picked up by the path mapper and the debugger displays the
relevant files :).

This is my Eclipse installation:
dtp-sdk_1.5.1_N091207.zip
eclipse-SDK-M20070913-1500-win32.zip
eclipse-test-framework-M20070913-1500.zip
emf-sdo-xsd-SDK-M200709120130.zip
GEF-SDK-M20070814-1555.zip
mylyn-2.1M1-e3.4.zip
org.eclipse.php_feature-incubation-S20070910_RC1.zip
RSE-SDK-I20070906-0800.zip
wtp-sdk-M-2.0.1RC2-20070913200918.zip

The server is running apache 2.0.59 and php 5.2.3 and xdebug 2.0.0RC4.

I use PuTTY to setup a remote ssh tunnel that forwards the remote port X to
local port 9000.

Regards,

Marijn.


From: Dave Kelsey [mailto:dkel50@hotmail.com]
Sent: 18 September 2007 21:53
To: Marijn van Zon
Subject: RE: XDebug and Path Mapping in RC1

Sorry Marijn, just saw the email. Did upgrading to 2.0.0 fix your problem ?
I must admit I
would have thought it would work with rc4, but I didn't do any testing with
it.

Cheers
Dave

> From: marijn@suninet.org
> To: dkel50@hotmail.com
> Subject: Re: XDebug and Path Mapping in RC1
> Date: Sat, 15 Sep 2007 00:27:51 +0200
>
> While going through all the software I found out that the remote server is
> running xdebug 2.0.0RC4 instead of the final release 2.0.0 *shrug*. Going
> to upgrade and test again to see if that fixes the problem...
>
> Regards,
>
> Marijn.
>
> ----- Original Message -----
> From: "Dave Kelsey" <dkel50@hotmail.com>
> Newsgroups: eclipse.tools.pdt
> Sent: Friday, September 14, 2007 6:21 PM
> Subject: Re: XDebug and Path Mapping in RC1
>
>
> > No, there is no way to debug the interactions currently without
> > downloading the source and running in a runtime workbench.
> >
> > Could you provide some more details about your environment, ie
> > web server, and platform, PDT platform etc.
> >
> > Cheers
> >
> >
> > Marijn van Zon wrote:
> >> Yey! Great work to add path mapping on this short notice :D.
> >>
> >> Unfortunately it's not yet working for me :(. The weird thing is that
> >> initially it did work. As far as I know I didn't change any settings
> >> between the last working run and the one after that.
> >>
> >> I have set my File / Project to: /project/trunk/index.php
> >> Break at First Line is on.
> >> The URL is auto generated to http://remote/trunk/index.php
> >>
> >> The thing though is that index.php does include files outside of the
> >> project however on my initial working run I'd just get a message
> >> stating that the file could not be found.
> >>
> >> Pretty weird. Is there a possibility to view some logs somewhere and
> >> debug information to find out what exactly happens.
> >>
> >> Regards,
> >>
> >> Marijn.
> >>
> >> Dave Kelsey wrote:
> >>> In the launch, the URL defines the initial URL to be invoked when you
> >>> want to debug your web environment. Once debugging you then control
> >>> the
> >>> application from the web browser.
> >>>
> >>> If your web server document root points to your PDT workspace, then
> >>> the
> >>> content of the File/Project field is not important.
> >>>
> >>> If however your server document root points to a different location
> >>> and
> >>> you have a copy of the scripts in your PDT workspace, then the
> >>> File/Project
> >>> field is very important as it is required to setup the path mapping
> >>> information
> >>> internally between the scripts which are running on the web server and
> >>> the where these scripts exist within your PDT workspace. In this
> >>> scenario the
> >>> URL you specify will invoke the initial PHP script. You specify in
> >>> File / Project
> >>> this script that is located in your PDT workspace so that path mapping
> >>> will
> >>> work. (specifying just a project will not work, although it could be
> >>> made to work
> >>> in the future as an enhancement).
> >>>
> >>> I hope to publish this info in a better place at some point, but I
> >>> hope it
> >>> helps you understand what is going on.
> >>>
> >>> Dave Kelsey
> >>>
> >>> Jacob Weber wrote:
> >>>> "Dave Kelsey" <dkel50@hotmail.com> wrote in message
> >>>> news:fc6cuh$hbo$1@build.eclipse.org...
> >>>>> RC1 now contains an automated ability to map paths when debugging
> >>>>> web scripts for xdebug. This means you can now debug remote server
> >>>>> scripts within PDT.
> >>>>
> >>>> I'm seeing some inconsistent behavior with xdebug, but maybe I'm
> >>>> doing it wrong. In Debug > PHP Web Page > Server, what's the
> >>>> relationship between File/Project and URL? Or more specifically, what
> >>>> exactly does the File/Project setting do?
> >>>>
> >>>> I've found that if they both refer to the same PHP file, the debug
> >>>> session starts correctly, and the server sends the XDEBUG_SESSION
> >>>> cookie back. From then on, I'm able to set breakpoints in other
> >>>> files, go to other URLs in the browser, and the debugger will become
> >>>> active.
> >>>>
> >>>> But it doesn't seem to work if they refer to different files. For
> >>>> example, if File/Project just has a project name in it, Eclipse won't
> >>>> debug anything. And if URL contains a URL that redirects somewhere
> >>>> else on the same server, it also doesn't work. In both cases, the
> >>>> XDEBUG_SESSION cookie *does* get sent back to the browser, but
> >>>> Eclipse must be ignoring it.
> >>>>
> >>>> Any ideas?
> >>>> Jacob
> >>>>
> >>>>
>
Previous Topic:variables tab refreshing
Next Topic:<?php tags and bookmarks
Goto Forum:
  


Current Time: Fri Apr 26 16:37:28 GMT 2024

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

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

Back to the top