Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Problem with XDebug and breakpoints.
Problem with XDebug and breakpoints. [message #65236] Tue, 29 January 2008 20:47 Go to next message
Josef van Niekerk is currently offline Josef van NiekerkFriend
Messages: 4
Registered: July 2009
Junior Member
Hi all!

I am having a serious problem with XDebug and using breakpoints. Even in
the simplest files, they are being ignored.

When I run with "Break At First Line" selected in my PHP Web Page Debug
Dialog, the debugger works fine. Variables are showing up in the Variables
watch window, and I can step through/into code by pressing F5 and F6, or
clicking the Step Into/Over buttons on the PHP Debug perspective toolbar.

However, I have tried everything with getting breakpoints to work. I even
created a new index file with nothing but the following PHP code:
<?
$x = 10;
$y = 25;
$z = $x * $y;
$z += $x;
echo 'Value : ' . $z;
?>

I then set a breakpoint at the line reading $z = $x * $y;. But XDebug just
ignores it.

I am using Eclipse Europa version 3.3.1.1 (Build ID: M20071023-1652) with
XDebug file: php_xdebug-2.0.2-5.2.5.dll.

As I've said, First Line Breaking works, but Breakpoints don't. phpInfo()
is showing my XDebug as installed and working okay.

My php.ini settings for XDebug are:
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
zend_extension_ts="d:\server\php\php_xdebug-2.0.2-5.2.5.dll "

I doubt it's the .ini file. If it was wrong I think XDebug wouldn't have
worked at all.

I even downloaded php_xdebug-2.0.2-5.2.5.dll again, and re-extracted a the
PDT from the Zip archive, wiped all my project and workspace settings and
opened them from scratch.

I really like XDebug a lot, and it worked for me before. I just don't
understand why now, all of a sudden it's going funny on me.

Please help me!?
Re: Problem with XDebug and breakpoints. [message #65256 is a reply to message #65236] Tue, 29 January 2008 21:05 Go to previous messageGo to next message
Josef van Niekerk is currently offline Josef van NiekerkFriend
Messages: 4
Registered: July 2009
Junior Member
Just made a discovery:
Eclipse Version: 3.3.0 Build id: I20070625-1500 does not behave like I've
mentioned above. (This is the version I previously had) Breakpoints appear
to work perfectly with it.

When I updated to the version I mentioned above and that's where the
problem started.

I noticed a new version R20080103 is available for download here at
eclipse.org.

Does anyone know if this breakpoint problem has been fixed? I'll only know
by tomorrow afternoon, as I suffer a 56k modem line...downloading is
dreadful.

Hoping for the best. One again, great job on the great debugger, no one
could have done it better!!!
Re: Problem with XDebug and breakpoints. [message #65277 is a reply to message #65256] Wed, 30 January 2008 01:10 Go to previous messageGo to next message
Thijs Putman is currently offline Thijs PutmanFriend
Messages: 3
Registered: July 2009
Junior Member
Just installed R20080103 and the problem is sadly still present... Telling
Eclipse to break at first line works as expected.

Additionally: Using the XDebug function "xdebug_break()" anywhere in my
project also makes the debugger kick in. This makes an effective work
around for the time being. Just place a "xdebug_break()" call anywhere in
your code to start debugging.
Re: Problem with XDebug and breakpoints. [message #65298 is a reply to message #65277] Wed, 30 January 2008 07:05 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
Can you describe your environment, ie platform, layout of webserver htdocs,
your workspace layout of the same code, version of xdebug ?
Also can you generate an xdebug log of the interaction, add an entry to php.ini
to look something like
xdebug.remote_log="c:\temp\xdebug.log"

Finally there may be some path mapping entries generated. To view these you need to
go to preferences, expand the PHP tab and select PHP Servers. Select the PHP Server
you are using and press edit. There is a path mapping tab, so select this and note
any information that is in there.

If you could post the results that would be very useful

Regards
Dave Kelsey


Thijs Putman wrote:
> Just installed R20080103 and the problem is sadly still present...
> Telling Eclipse to break at first line works as expected.
>
> Additionally: Using the XDebug function "xdebug_break()" anywhere in my
> project also makes the debugger kick in. This makes an effective work
> around for the time being. Just place a "xdebug_break()" call anywhere
> in your code to start debugging.
>
Re: Problem with XDebug and breakpoints. [message #65365 is a reply to message #65298] Wed, 30 January 2008 20:27 Go to previous messageGo to next message
Thijs Putman is currently offline Thijs PutmanFriend
Messages: 3
Registered: July 2009
Junior Member
I'm using Vista Business x64, but all relevant applications in this case
are regular x86 versions. Running Apache 2.2.5, PHP 5.2.4 (CGI) and Xdebug
2.0.2 (binary from xdebug.org).

The project I'm working on is physically located at "D:\Web\Projects\CMS",
named "CMS" in Eclipse and accessible via Apache2 from
"http://localhost/~CMS". All interaction with the application takes place
using an "Index.php" file located in the root folder of the project.

In the debug configuration I've manually set the URL and under "Advanced"
indicated to "Debug All Pages". The server configuration points to
localhost and one path mapping is defined: Path on server "/~CMS" is
mapped to "/CMS" (root folder of the CMS project).

I've created two log-files: One with the debug configuration set to break
at first line (xdebug-break_at_first.log), which is line 14 in Index.php.
The second log-file (xdebug-custom_break_point.log) has this option
disabled, but includes a manual break point at line 14, which is what
doesn't work at the moment...

I'm not an expert but from a quick look at the log-files I would say
Eclipse refers to the file a "file:///~CMS/Index.php", whilst Xdebug
refers to it as "file:///D:/Web/Projects/CMS/Index.php".

Full log-files are available at http://www.sgraastra.net/Dump/PDT

Please let me know if you need more information...
Re: Problem with XDebug and breakpoints. [message #65387 is a reply to message #65365] Thu, 31 January 2008 08:34 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
I think I see what the problem is, it is the path mapping definition in eclipse. You
should delete this path mapping.
The path mapping facility is used to relate the 2 sets of physical files being used
(ie the files which the web server uses and the files that PDT has in its workspace).
So in your case the path mapping should be
Path On Server: D:\Web\Projects\CMS
Local Path: /CMS

When you create the debug configuration launch, if you specify the file "/CMS/index.php"
and define your URL to be "http://localhost/~CMS"

Then PDT should create the above path mapping automatically for you when you launch it (it
does this be seeing the file you have selected from the workspace and compares it with the
file xdebug has seen and has sent the name to PDT as part of the initial communications).
The only time a path mapping won't be required is if the files used by your web server
are the same files that are in your eclipse workspace, ie they both are looking at the
same copies of the files on your disk.

I hope this helps.
Dave Kelsey


Thijs Putman wrote:
> I'm using Vista Business x64, but all relevant applications in this case
> are regular x86 versions. Running Apache 2.2.5, PHP 5.2.4 (CGI) and
> Xdebug 2.0.2 (binary from xdebug.org).
>
> The project I'm working on is physically located at
> "D:\Web\Projects\CMS", named "CMS" in Eclipse and accessible via Apache2
> from "http://localhost/~CMS". All interaction with the application takes
> place using an "Index.php" file located in the root folder of the project.
>
> In the debug configuration I've manually set the URL and under
> "Advanced" indicated to "Debug All Pages". The server configuration
> points to localhost and one path mapping is defined: Path on server
> "/~CMS" is mapped to "/CMS" (root folder of the CMS project).
>
> I've created two log-files: One with the debug configuration set to
> break at first line (xdebug-break_at_first.log), which is line 14 in
> Index.php. The second log-file (xdebug-custom_break_point.log) has this
> option disabled, but includes a manual break point at line 14, which is
> what doesn't work at the moment...
>
> I'm not an expert but from a quick look at the log-files I would say
> Eclipse refers to the file a "file:///~CMS/Index.php", whilst Xdebug
> refers to it as "file:///D:/Web/Projects/CMS/Index.php".
>
> Full log-files are available at http://www.sgraastra.net/Dump/PDT
>
> Please let me know if you need more information...
>
Re: Problem with XDebug and breakpoints. [message #65408 is a reply to message #65387] Thu, 31 January 2008 13:57 Go to previous messageGo to next message
Thijs Putman is currently offline Thijs PutmanFriend
Messages: 3
Registered: July 2009
Junior Member
That did the trick, thanks! Everything is working as it should right now.
Re: Problem with XDebug and breakpoints. [message #65536 is a reply to message #65408] Fri, 01 February 2008 12:46 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
that's great to know.

Dave Kelsey

Thijs Putman wrote:
> That did the trick, thanks! Everything is working as it should right now.
>
Re: Problem with XDebug and breakpoints. [message #65576 is a reply to message #65536] Sat, 02 February 2008 10:55 Go to previous message
Josef van Niekerk is currently offline Josef van NiekerkFriend
Messages: 4
Registered: July 2009
Junior Member
Sorry for only getting back now. My problem was resolved simply be
downloading the newest PDT release.

I can even jump into files that are not even in the same project. XDebug
is great!

Thanks!!!
Previous Topic:Remote System Explorer + Include Path
Next Topic:PDT under windows
Goto Forum:
  


Current Time: Thu Dec 26 23:50:10 GMT 2024

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

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

Back to the top