Problem with XDebug and breakpoints. [message #65236] |
Tue, 29 January 2008 20:47 |
Josef van Niekerk 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 #65387 is a reply to message #65365] |
Thu, 31 January 2008 08:34 |
D Kelsey 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...
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03368 seconds