|XDebug JIT and duplicate files [message #651106]
||Thu, 27 January 2011 19:08
| Brendan Dunn
Registered: January 2011
Odd bit of behavior here.|
I am working on a large project, which is a mixture of C/C++ applications and libraries, and PHP pages. My Eclipse environment has both the CDT and PDT installed (Helios). Consider the structure to be the following:
main - Contains the entire project - sub-folders for each library and application, as well as the web folder. Also contains the main Makefile.
www - Sub-directory of main. Contains all PHP files.
So, when I put this all into eclipse, I end up creating two separate projects in the workspace. Project 1 is a C/C++ Makefile Project, based off of the main folder. Project 2 is a PHP Project, based off the www sub-folder. Though both projects are using the same source tree and same files (created using existing source), the workspace sees each folder under the www tree twice - once in each project.
So, the problem - I'm debugging the PHP portion using XDebug JIT. Everything seems to work fine connection-wise; I can set a breakpoint in one of the files under the www project, and if I hit it with a browser with the XDebug cookies set, Eclipse catches the breakpoint. At this point, though, it opens the file in the *main* project for debugging.
I can't just work with the main project, as PDT requires me to both have the www PHP project, and to put the breakpoints in there directly. Basically:
1. I put a breakpoint in /www/test.php, it will get hit - but the debugger will open /main/www/test.php
2. If I put a breakpoint in /main/www/test.php, it will not get hit.
3. If I eliminate the www PHP project entirely and set a breakpoint, it will throw errors.
This means that during debugging, I end up with each file open twice, which is potential for confusion/error (changes in one won't immediately reflect in the other, even though the underlying filesystem file is the same). Since it's JIT debugging, the settings in the Debug Configurations don't apply to the breakpoints - it seems to just pick the first instance of the file it finds in the workspace (alphabetically by project - my current brute-force workaround is to make sure the www project is named to come first in the workspace).
Is there any more elegant way to tell it to only focus on the PHP project(s) in the workspace when it hits an XDebug breakpoint?
[Updated on: Thu, 27 January 2011 19:35]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02297 seconds