Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 169575 - Zend debugger 5.2.3 does not stop in any breakpoints
Summary: Zend debugger 5.2.3 does not stop in any breakpoints
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: Shalom Gibly CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-04 13:34 EST by Francis Upton IV CLA
Modified: 2020-05-14 13:18 EDT (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Upton IV CLA 2007-01-04 13:34:53 EST
PHP IDE 0.7.0 20070101
Eclipse 3.2.1
PHP Version 4.3.10

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Debugger v5.2.3, Copyright (c) 1999-2006, by Zend Technologies

I followed the instructions here (except that I use 5.2.3 of the debugger instead of 5.2.1)

http://mprobst.de/SherlockWeb/?postid=2


Like I have seen in other postings here, when I specify to stop initially, it correctly does so, however, if I have any breakpoints, whether they be in the outer (index.php) file, or included files, they are never hit.

However, I can see that the debugger is getting invoked when I an fetching a page that invokes PHP, when when I hit the suspend button in the debugger window, it stops as I expect and gets a good stack along with showing the variable state and such.
Comment 1 Francis Upton IV CLA 2007-01-05 16:20:58 EST
Problem appears also with the XDebug debugger:

Hi Dave,

I have made a very simple test application with a couple of breakpoints and it does not hit the breakpoints at all (the behavior is exactly the same as when used with the Zend debugger).

Here is my test program:

<?php

print "<html><head></head><body>";

print "<br><p>Hi Mom!";

print "<br><p>Hi Mom again.";

print "<br><p>Hi mom yet again";

print "</body></html>";
?>



I set a breakpoint on each line, and execute this with the XDebug debugger, and none of the breakpoints it hit, and the page appears in the browser.

If I set it to break on the first line, it does properly stop there, but when I continue, it just finishes ignoring the breakpoints.

This problem is essentially the same as:

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

I will put this as an attachment to the bug report, because it appears that the problem might not have anything to do with the specific debugger, rather it is in the client side support for communicating breakpoints.

Francis
Comment 2 Francis Upton IV CLA 2007-01-06 13:02:03 EST
My comment related to XDebug is unrelated to this; I was able to resolve the XDebug problems and make it respect breakpoints.
Comment 3 Al Briggs CLA 2007-01-10 07:15:57 EST
I'm also finding this bug to be a pain - help please!
Comment 4 Dominic Clifton CLA 2007-01-16 13:12:37 EST
I also have the same problem.

I used slightly older of php ide and the zend debugger but upgraded them today to the latest versions which are now as follows:

PHP IDE 0.7.0 20070111
ZendDebugger-5.2.3-linux-glibc21-i386
PHP V4.4.0-pl1-gentoo
Eclipse 3.2.0 - Build id: M20060629-1905 (the all in one package from zend's site)
Comment 5 Max Okorokov CLA 2007-01-24 00:53:06 EST
Again the same problem with breakpoints...

Eclipse SDK
Version: 3.2.1
Build id: M20060921-0945

PHP IDE v 0.7.0

ZendDebugger-5.2.3-Windows-i386
Comment 6 Michael CLA 2007-01-25 11:11:08 EST
Hi,

I am the author of "Almost too good to be true:
Debugging PHP with Eclipse PHP IDE and Zend Debugger on Mac OS X", which   explains the installation on a PPC (non-Intel) Mac.

I am happy to realize this how-to has helped a lot of people to get running installation, but unfortunately this only works for PPC (non-Intel) Macs as the debugger will not stop at breakpoints on an Intel-Mac. Thus, I would really like to be able to share a positive experience if somebody has been able to set it up correctly on an Intel-Mac.

I know this has been a topic here lately, but no one really seems to be sure about the result, so I would like to point out clearly whether it is a bug or a configuration issue:

       * * *
Is there anybody that gets Eclipse PHP Tools (PDT -- formerly Eclipse PHP IDE) stopping at the breakpoints on an Intel (!) Mac?
       * * *

The main problem seems to be the 5.2.3 version of the ZendDebugger.so. Unfortunately, the 5.2.1 version which worked fine is not installable on an Intel Mac.

Thank you very much for your responses,

michael

ps. If you wish to reply, please use the comment function on my blog. 
Comment 7 mark CLA 2007-02-13 09:38:51 EST
I got same problem on 
windows XP
PHP 5.1x
Zend debugger 5.2.3
Eclipse 3.2
Comment 8 Andy Robinson CLA 2007-02-16 11:20:55 EST
Pretty much a "me too", but what is (hopefully) interesting is that 
suspend and resume seem to work fine, so if I try something like:

<?php
    for ($i = 1; $i < 10; $i++) {
       print $i;
       sleep(1);	// give me time to hit pause
    }
?>

I can pause and resume fine whilst in the loop, and get variable states etc, but cheerfully ignores any breakpoints I set.

Client:

	WinXP Pro
	Eclipse 3.2.0
	PDT 0.7.0.v20070214

Server:
	
	Linux: 2.6.15
	ZendDebugger 5.2.3
	PHP 4.4.4	
	
I also tried 5.2.1 but got various "[Zend Debugger] Unknown debugger command of type 10000" errors.

Comment 9 Dennis CLA 2007-02-18 01:07:24 EST
Eclipse SDK Version: 3.2.2 Build id: M20070212-1330
Zend Engine v2.2.0
Zend Debugger v5.2.3

Sure would be nice if we could get this fixed.  

Seems to be problematic when not specifying a file name in the URL.  Works fine when I use an URL like this:

http://localhost/index.php

But does not work when using an URL like this:

http://localhost/delete/id/6/

Normally this would be good workaround except when using the Zend framework which uses a redirect to index.php for all URLs, and the URLs do not include a file name.
Comment 10 Michael CLA 2007-02-20 16:33:30 EST
The problem seems to be SOLVED:

Today I downloaded an aparently new build of the Zend Debugger 5.2.3, which still has the same version number but simply works. The Zend Download page lists a date of feb, 18., which is why I tried downloading it again. I used exactly the same configuration lines as before, and now it works. It stops at all breakpoints. 

Mac OS X 10.4.8
Eclipse PDT All in One M4
ZendDebugger 5.2.3 (downloaded today!)
Comment 11 Jeremy Huylebroeck CLA 2007-02-27 18:39:37 EST
I installed the latest ZendDebugger and it is still not working for me.
Only stopping if "Break at First Line" is checked.

Config:
Windows XP
Xampp 1.5.5 (PHP 5.2.0)
Eclipse 3.2
ZendDebugger eclipse client 0.1.7
ZendDebugger 5.2.3 (February 26).
Comment 12 Dennis CLA 2007-03-20 00:25:30 EDT
I am assuming that no one is monitoring the php.debug-inbox.  Does anyone know how to get someones attention regarding this bug.  

It makes the debugger basically useless when trying to work with redirects from an address like this:

http://localhost/delete/id/6/

I am currently using:

Eclipse SDK
Version: 3.2.2
Build id: M20070212-1330

PDT Core Plug-in Version 0.7.v2007022
Zend Debugger 5.2.3

OS: Linux 2.6.17

Still fails, and so easy to duplicate the problem.  

Comment 13 Tadis CLA 2007-03-28 12:03:28 EDT
I would just like to report that I cannot get the debug as web page to stop on either my intel imac or on my win xp pc.

I have downloaded the pdt all-in-one package on both systems and the debug as script works fine on both.


Comment 14 Michael Favia CLA 2007-04-13 02:43:25 EDT
I just wanted to shed a little personal experience to see if I might be able to resolve this problem for a few people. I had configured my server to use a symlink in /var/www that pointed to /home/myname/workspace/project. Because the file path of the two resources didnt match when the debugger was working the only way i was able to get the debugger to stop was with a sleep(X) statement and a manual pause. After i read up on the issues regarding paths in xdebug i thought i might be experiencing the same problem and it turned out i was. 

So long story short if you are experiencing the inability to stop at breakpoints and running php5.2.X and zenddebugger 5.2.3 please try making sure that your httpconf defines the same working root as your eclipse project path instead of just a symlink to the "same" location. It worked for me.
Comment 15 Michael Favia CLA 2007-04-17 13:15:27 EDT
As a revisit the breakpoints only continued to work while i was testing the SAME URL as the "File/Path" specified under "debug... > php web page" . My web application uses modrewrite so any page after that first page wouldnt work. I attempted to append the cleanURL as a GET variable (e.g. index.php?q=my/path) but the debugger failed to stop again despite the same "root name"
Comment 16 alex CLA 2007-04-24 17:35:47 EDT
Eclipse 3.2.0 (pdt-0.7.0.S20070401-RC3_debugger-0.1.7-all-in-one-win32.zip)
PHP Version 4.4.4
Zend Engine v1.3.0
Zend Debugger v5.2.3
Windows XP

Ok, I had the problem where it wasn't stopping at breakpoints as well, but as Dennis pointed out there was a way around it. The settings listed below are all that I changed/set to allow me to debug an entire project:

Server Tab
  File/Project = /forum/index.php
  URL = http://localhost/forum/index.php (had to manually edit this)
Advanced Tab
  Session Settings 
  - Open in Browser selected
  - Start Debugging From = http://localhost/forum/index.php
  - Continue Debug from this Page selected


With these settings I can debug the entire project (vbulletin forum) and it will stop at all breakpoints in all files. 

I'm not sure if any other combination of settings work, but this seems to work for me when it didn't before. 
Comment 17 jimmyjackson CLA 2007-04-28 12:30:01 EDT
Eclipse 3.2.0 (pdt-0.7.0.S20070401-RC3_debugger-0.1.7-all-in-one-win32.zip)
PHP Version 4.4.4
Zend Engine v1.3.0
Zend Debugger v5.2.3
Windows XP

Like so many others, the ZendDebugger appears to function fine without errors, but will not stop at any breakpoints. It will, however, stop if "Break at First Line" is checked, and you can continue stepping through, but it is a huge pain.

On my machine, I discovered that the ZendDebugger would work with some projects and not others. I determined that the difference was that the ones which worked were using Auto-Generate for the URL.

For example, previously I may have specified the Eclipse Project to begin at "C:\Workspace\Project-A" and had the index file located at "C:\Workspace\Project-A\trunk\index.php". But you can't use URL Auto-Generate because it thinks the URL is "http://www.yourserver.com/trunk/index.php" when it is actually "http://www.yourserver.com/index.php"... Even though everything else appears to work, the ZendDebugger does not.

My solution was, therefore, to move the project root to "C:\Workspace\Project-A\trunk" with the index file located at "C:\Workspace\Project-A\trunk\index.php" and leaving URL Auto-Generate on with the URL correctly generated as "http://www.yourserver.com/index.php".

Now it is stopping at all breakpoints! :)
Comment 18 Tihomir Heidelberg CLA 2007-05-16 10:10:02 EDT
> On my machine, I discovered that the ZendDebugger would work with some projects
> and not others. I determined that the difference was that the ones which worked
> were using Auto-Generate for the URL.

I had the same problem. I found that if I have set Server / Configure /
"Enter the URL that points to the document root of this server" to
something longer then "http://localhost" then it will not stop at
breakpoint. I tried http://localhost/web and even http://localhost/
(only ending slash added), then it will not work.

So, now I have http://localhost and I disabled Auto Generate and entered
URI and it works :)

Comment 19 Fernando Carvalho CLA 2007-06-28 19:57:05 EDT
I think it's happening in my linux box (ubuntu 7.04 / eclipse 3.22).
Using zend debugger it tries to open the included files with wrong path, ie
/classes/miolo.class (php file)
becomes:
es/miolo.class
loosing 6 characters 
Please, someone reply if there is some workaround.
Thanks
Comment 20 Shalom Gibly CLA 2007-07-01 06:40:32 EDT
1. Make sure you are using the latest PDT.
2. Make sure that the inner paths of the files in your project are similar to 
what you have on the server. Especially, make sure that the included files path 
is similar. 
3. We will work out a solution for non-trivial settings of path mapping in the 
near future. For now, the path mapping is very strict and will fail if the 
server holds a different directory structure then expected.
Comment 21 Steve Shaffer CLA 2007-07-18 21:07:58 EDT
The setup:
Fedora Core 6
Eclipse 3.2.100
PDT core: 1.0.0v2007611
PHP: 5.1.6
Zend Debugger:v5.2.3 
I can't seem to get this to work in my situation.
I have 
a path: /var/www/html/projectname/
a URL of: http://localhost/projectname/
debug from: http://localhost/projectname/index.php

Since we're going to need to live with this for a while could someone publish
what strict path naming means?



Comment 22 Rodrigo Saboya CLA 2007-07-21 22:26:32 EDT
I also ran into this bug...

I was able to make it work using some of the info in the comments. I set Apache's root dir to /home/myuser/workspace, manually assigned the URL (no Auto Generate) and checked "Debug All Pages". Working so far.
Comment 23 Shalom Gibly CLA 2007-08-27 10:20:41 EDT
We worked out a solution for situations where the Apache has an Alias directive 
in its httpd.conf file. 
It appears that this solution solved the problem for the breakpoints in the 
Zend debugger.
The fix will be available in the next integration build, and we would really 
like to know if it solved the problems you described in this bug.
Let us know, 
Shalom Gibly
PDT team
Comment 24 Gadi Goldbarg CLA 2007-09-02 16:29:18 EDT
Fixed - verified with debugger 5.2.10 and 20070902
Comment 25 Gadi Goldbarg CLA 2007-09-02 16:29:53 EDT
fixed
Comment 26 Gustavo CLA 2007-09-04 01:02:28 EDT
Could you tell me How (and Where) can I download the fix for this bug?
Thanks in advance!
Comment 27 Rob Latham CLA 2007-09-07 23:33:09 EDT
If you are still having problems with the debugger skipping break points, check the connector port. Zend likes to use 10013 and Eclipse sets this up as 10000.
Comment 28 Francesco CLA 2007-10-19 03:25:58 EDT
Fixed...

I've followed http://benramsey.com/archives/zend-executable-debugger-eclipse-plugin/

and debugged as a PHP Script, not as a PHP Application