Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323569 - Debug PHP Script break at random positions
Summary: Debug PHP Script break at random positions
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 04:04 EDT by Axel CLA
Modified: 2020-05-14 11:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel CLA 2010-08-25 04:04:34 EDT
Build Identifier: 20100617-1415

On Ubuntu Linux 10.04 (Lucid) with PHP 5.3 and ZendDebugger Eclipse PHP Debug stops at random positions a lot of Times before actually reaching the defined Breakpoint.

I experienced this in a Zend Framework Project.

This also happens in a completely fresh Installation of Eclipse with a new Workspace.


Reproducible: Always

Steps to Reproduce:
1. Create a new PHP Project and setup a simple ZendFramework CLI application.
2. Reference the Zend Framework code to the project (Project Properties > PHP Include Path > Projects)
3. Setup a "PHP Script" debug configuration for your app
4. Set a breakpoint somewhere in your code.
5. Launch the debug config.

The debugger stops at random points a lot of times.
In my case it always stops at the first line in Zend_Loader.loadFile() which is self::_securityCheck($filename); - And there is NO breakpoint for this line.
But also on Zend_Cache_Backend_ExtendedInterface right where the interface keyword is.

With this behavior, debugging a PHP Script is almost impossible.
Comment 1 Axel CLA 2010-08-25 04:33:35 EDT
I just found out that this happens when the include_path of php.ini to the Zend Framework is some other location in the filesystem than the workspace of Eclipse.

i.e.
* Zend Framework is located in /usr/share/php
* ~/workspace/zend-framework contains a symlink Zend pointing to /usr/share/php/Zend
* php.ini include path is set to /usr/share/php
* PHP Debug stops randomly at files which paths could not be mapped


Changing the include path in php.ini to the workspace location and copy the Zend folder instead of symlinking it resolves the issue. But this is only a workaround IMHO and the Problem should be fixed.

It also happens in Website debugging when a file location could not be mapped.
Comment 2 Roy Ganor CLA 2010-08-25 08:50:08 EDT
this was fixed lately.

You can grab the latest nightly build or ait until SR-1 is out.
Comment 3 Kalin CLA 2011-07-28 09:55:46 EDT
No longer reproducible.
Closing...