Skip to main content



      Home
Home » Language IDEs » PHP Development Tools (PDT) » Can't get XDebug to work
Can't get XDebug to work [message #47626] Wed, 29 August 2007 02:46 Go to next message
Eclipse UserFriend
Hello,

Just started with trying to get debugging to work. I work on a remote
development server and use an ssh tunnel to forward a remote port to my
local computer. That works fine, when I manually launch the windows xdebug
client and start an XDEBUG session it gets a connection from the web server.
However when I subsequently try to debug in eclipse nothing happens
(breakpoints are ignored).

I have configured my debug as followed:
Open Debug Dialog > PHP Web Page > New
Server Debugger: XDebug
File / Project: /Project/name/index.php
Breakpoint: Break at First Line (tried to set this both on and off)
URL: Autogenerate (comes up with the correct:
http://some.host/some/path/name/index.php)
Session Settings: Open in Browser > Debug All Pages
Save as: Local file
Standard Input and Output: Allocate Console
Tried with 'Launch in background' both on and off

Regards,

Marijn.
Re: Can't get XDebug to work [message #47712 is a reply to message #47626] Wed, 29 August 2007 05:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi Marjin,

are you sure a connection is established ? ie the launching task disappears
from the bottom right hand corner of eclipse ?

If it does I would expect Break at first line to work. I would not expect
breakpoints to work. Currently the only way to debug web pages is for
either apache or IIS to be on your workstation and for the document root to
point to either your workspace or a specific project. For your kind of
situation you need path mapping which maps the files in your workspace to
the file located on your web server (xdebug needs to be told the fully
qualified filename of the file to place the breakpoint in which is not going
to be the same as the one in your workspace). There is currently no path mapping
solution available in PDT.

Dave Kelsey

Marijn van Zon wrote:
> Hello,
>
> Just started with trying to get debugging to work. I work on a remote
> development server and use an ssh tunnel to forward a remote port to my
> local computer. That works fine, when I manually launch the windows xdebug
> client and start an XDEBUG session it gets a connection from the web server.
> However when I subsequently try to debug in eclipse nothing happens
> (breakpoints are ignored).
>
> I have configured my debug as followed:
> Open Debug Dialog > PHP Web Page > New
> Server Debugger: XDebug
> File / Project: /Project/name/index.php
> Breakpoint: Break at First Line (tried to set this both on and off)
> URL: Autogenerate (comes up with the correct:
> http://some.host/some/path/name/index.php)
> Session Settings: Open in Browser > Debug All Pages
> Save as: Local file
> Standard Input and Output: Allocate Console
> Tried with 'Launch in background' both on and off
>
> Regards,
>
> Marijn.
>
>
Re: Can't get XDebug to work [message #47889 is a reply to message #47712] Wed, 29 August 2007 18:24 Go to previous messageGo to next message
Eclipse UserFriend
There does not seem to be a launching task at all and the debugger does not
finish by itself. Even when I terminate it it keeps listening (don't know if
this is expected behaviour or not). Is there a way to get more detailed
information on what happens when I fire up a debug session?
As for the path mapping I actually use RSE and create a new folder that
links to the development server, so I am in a sense working directly there
and not locally doing synchronizations every once in a while.
I did however have to patch WST in order to get it working. Instead of an
IPath.toString() (which returns null for remote systems) an URI.toString()
is returned (from an IFile.getLocationURI()). Would this be sufficient to
overcome the deficit or would it still be present?

Regards,

Marijn.

"Dave Kelsey" <dkel50@hotmail.com> wrote in message
news:fb3f7a$u8b$1@build.eclipse.org...
> Hi Marjin,
>
> are you sure a connection is established ? ie the launching task
> disappears
> from the bottom right hand corner of eclipse ?
>
> If it does I would expect Break at first line to work. I would not expect
> breakpoints to work. Currently the only way to debug web pages is for
> either apache or IIS to be on your workstation and for the document root
> to
> point to either your workspace or a specific project. For your kind of
> situation you need path mapping which maps the files in your workspace to
> the file located on your web server (xdebug needs to be told the fully
> qualified filename of the file to place the breakpoint in which is not
> going
> to be the same as the one in your workspace). There is currently no path
> mapping
> solution available in PDT.
>
> Dave Kelsey
>
> Marijn van Zon wrote:
>> Hello,
>>
>> Just started with trying to get debugging to work. I work on a remote
>> development server and use an ssh tunnel to forward a remote port to my
>> local computer. That works fine, when I manually launch the windows
>> xdebug client and start an XDEBUG session it gets a connection from the
>> web server.
>> However when I subsequently try to debug in eclipse nothing happens
>> (breakpoints are ignored).
>>
>> I have configured my debug as followed:
>> Open Debug Dialog > PHP Web Page > New
>> Server Debugger: XDebug
>> File / Project: /Project/name/index.php
>> Breakpoint: Break at First Line (tried to set this both on and off)
>> URL: Autogenerate (comes up with the correct:
>> http://some.host/some/path/name/index.php)
>> Session Settings: Open in Browser > Debug All Pages
>> Save as: Local file
>> Standard Input and Output: Allocate Console
>> Tried with 'Launch in background' both on and off
>>
>> Regards,
>>
>> Marijn.
Re: Can't get XDebug to work [message #47920 is a reply to message #47889] Wed, 29 August 2007 20:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkel50.hotnospmail.com

I suspect (although I have not tried RSE) that it won't work. The
Information that has to be sent to XDebug on the server is the real
physical location of the file the server sees, and there is a good
chance that eclipse doesn't present that information from the standard apis.

PDT will always be listening on the appropriate port waiting for a
connection. When an XDebug launch is done, PDT waits for that 1st
initial session to connect, and if it didn't the launch will remain
incomplete waiting for that connection.

Dave Kelsey

Marijn van Zon wrote:
> There does not seem to be a launching task at all and the debugger does not
> finish by itself. Even when I terminate it it keeps listening (don't know if
> this is expected behaviour or not). Is there a way to get more detailed
> information on what happens when I fire up a debug session?
> As for the path mapping I actually use RSE and create a new folder that
> links to the development server, so I am in a sense working directly there
> and not locally doing synchronizations every once in a while.
> I did however have to patch WST in order to get it working. Instead of an
> IPath.toString() (which returns null for remote systems) an URI.toString()
> is returned (from an IFile.getLocationURI()). Would this be sufficient to
> overcome the deficit or would it still be present?
>
> Regards,
>
> Marijn.
>
> "Dave Kelsey" <dkel50@hotmail.com> wrote in message
> news:fb3f7a$u8b$1@build.eclipse.org...
>> Hi Marjin,
>>
>> are you sure a connection is established ? ie the launching task
>> disappears
>> from the bottom right hand corner of eclipse ?
>>
>> If it does I would expect Break at first line to work. I would not expect
>> breakpoints to work. Currently the only way to debug web pages is for
>> either apache or IIS to be on your workstation and for the document root
>> to
>> point to either your workspace or a specific project. For your kind of
>> situation you need path mapping which maps the files in your workspace to
>> the file located on your web server (xdebug needs to be told the fully
>> qualified filename of the file to place the breakpoint in which is not
>> going
>> to be the same as the one in your workspace). There is currently no path
>> mapping
>> solution available in PDT.
>>
>> Dave Kelsey
>>
>> Marijn van Zon wrote:
>>> Hello,
>>>
>>> Just started with trying to get debugging to work. I work on a remote
>>> development server and use an ssh tunnel to forward a remote port to my
>>> local computer. That works fine, when I manually launch the windows
>>> xdebug client and start an XDEBUG session it gets a connection from the
>>> web server.
>>> However when I subsequently try to debug in eclipse nothing happens
>>> (breakpoints are ignored).
>>>
>>> I have configured my debug as followed:
>>> Open Debug Dialog > PHP Web Page > New
>>> Server Debugger: XDebug
>>> File / Project: /Project/name/index.php
>>> Breakpoint: Break at First Line (tried to set this both on and off)
>>> URL: Autogenerate (comes up with the correct:
>>> http://some.host/some/path/name/index.php)
>>> Session Settings: Open in Browser > Debug All Pages
>>> Save as: Local file
>>> Standard Input and Output: Allocate Console
>>> Tried with 'Launch in background' both on and off
>>>
>>> Regards,
>>>
>>> Marijn.
>
>
Re: Can't get XDebug to work [message #48040 is a reply to message #47712] Thu, 30 August 2007 03:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.mark-kirchner.de

Hi,

Dave Kelsey wrote:
> For your kind of situation you need path mapping which maps the files
> in your workspace to the file located on your web server (xdebug
> needs to be told the fully qualified filename of the file to place
> the breakpoint in which is not going to be the same as the one in
> your workspace). There is currently no path mapping solution
> available in PDT.

Any plans / timeframe when this will be the case? I got that kind of
debugging to work for PDT M1 with your "standalone" XDebug-plugin v0.23
and the SampleMapper v0.0.2, so it seems that there already has been
some kind of solution for this problem.
It would be a real pity if switching to a newer version of PDT would be
blocked by the inability to debug remotely (or cross-platform in our case).

Regards (and thanks for the great work on the XDebug-integration),
Mark
Re: Can't get XDebug to work [message #48069 is a reply to message #48040] Thu, 30 August 2007 04:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.mark-kirchner.de

Mark Kirchner schrieb:
> I got that kind of debugging to work for PDT M1 with [...]

Sorry, that should read "PDT M2".

Regards,
Mark
Re: Can't get XDebug to work [message #48503 is a reply to message #48040] Thu, 30 August 2007 15:39 Go to previous message
Eclipse UserFriend
Hi Mark. I hope that I can sort out a solution for this soon.

Cheers
Dave Kelsey


Mark Kirchner wrote:
> Hi,
>
> Dave Kelsey wrote:
>> For your kind of situation you need path mapping which maps the files
>> in your workspace to the file located on your web server (xdebug
>> needs to be told the fully qualified filename of the file to place
>> the breakpoint in which is not going to be the same as the one in
>> your workspace). There is currently no path mapping solution
>> available in PDT.
>
> Any plans / timeframe when this will be the case? I got that kind of
> debugging to work for PDT M1 with your "standalone" XDebug-plugin v0.23
> and the SampleMapper v0.0.2, so it seems that there already has been
> some kind of solution for this problem.
> It would be a real pity if switching to a newer version of PDT would be
> blocked by the inability to debug remotely (or cross-platform in our case).
>
> Regards (and thanks for the great work on the XDebug-integration),
> Mark
Previous Topic:SPL Exception subclasses
Next Topic:Milestone 3 & Voting for the PDT 1.0
Goto Forum:
  


Current Time: Wed May 07 09:32:33 EDT 2025

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

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

Back to the top