Bug 338090 - XDebug breakpoints may resolve to files in a non-PDT project
Summary: XDebug breakpoints may resolve to files in a non-PDT project
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-24 09:35 EST by Brendan Dunn CLA
Modified: 2020-05-14 10:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Dunn CLA 2011-02-24 09:35:28 EST
Build Identifier: 20100917-0705

If two projects in a workspace share part of a common code-base containing PHP files, and a breakpoint is placed in one of these files, the debugger will resolve the breakpoint to the file in whichever project comes first alphabetically.  This will occur even if the first alphabetical project is a non-PDT project.

The breakpoints are still required to be set within a PDT project.  This means that each file will be opened twice for debugging - once by the developer when setting the breakpoint, and a second instance in the alternate project opened by the debugger.

Workaround - ensure PDT projects in the shared code-base are named alphabetically before non-PDT projects within the workspace.

Reproducible: Always

Steps to Reproduce:
Prerequisite - Eclipse environment with both CDT and PDT.  Webserver with PHP, and XDebug.  XDebug configured within eclipse. 
1. Create a new 'Hello World' C++ project called 'testphp'.  Instead of the default, create it in a location outside the workspace.
2. Create a sub-folder called 'www'.  Add a PHP file to the www folder called 'index.php'.  Give it at least one line that can support a breakpoint.
3. Create a new PHP project called 'www'.  Create at existing location, and choose the 'www' folder from the original project.
4. Deploy the index.php file to your webserver.  Create a breakpoint in 'workspace/www/index.php', and load the page.  The debugger will hit the breakpoint, but will open 'workspace/phptest/src/www/index.php'.
5. Remove the breakpoint from 'workspace/www/index.php', and place it in 'workspace/phptest/src/www/index.php'.  Load the page.  The breakpoint will not be hit.
6. (Optional) Repeat steps 3-5, but this time, call the project 'aaa-www'.  Since alphabetically, this occurs first in the workspace, XDebug will resolve PHP breakpoints to the file within the 'aaa-www' project.