Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000627XdebugUsage problemspublic2010-10-13 23:482012-06-27 22:09
Reportertoddw 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.1.0 
Target Version2.2.1Fixed in Version2.2.1 
Summary0000627: breakpoints set in symlinked files are ignored
DescriptionAny file I set a breakpoint at behind a symlinked folder will be skipped.

This is the same as bug 432 - though there is something that can be done - Xdebug can always use realpaths when dealing with breakpoint paths:

When xdebug receives a "breakpoint_set" command - it's possible to perform a "realpath()" to get the real target file path - and that is where Xdebug should set the breakpoint.
TagsNo tags attached.
Operating System
PHP Version5.3.3
Attached Files

- Relationships

-  Notes
(0001582)
toddw (reporter)
2010-10-14 01:17

Added a patch to perform a realpath check when receiving a breakpoint_set command:
http://bugs.activestate.com/attachment.cgi?id=12762 [^]

Any thoughts on adding this patch?
(0001584)
toddw (reporter)
2010-10-15 19:51

Updated patch - to support "breakpoint_remove" in the same way:
http://bugs.activestate.com/attachment.cgi?id=12770 [^]

For reference. We have a Komodo bug on this issue here:
http://bugs.activestate.com/show_bug.cgi?id=79147 [^]
(0001621)
weitzman (reporter)
2010-12-13 05:06

I can confirm that this is a long standing problem for Komodo users and we'd very much appreciate some feedback on this patch. Thanks.
(0001622)
derick (administrator)
2010-12-15 23:18

Sorry guys, I missed this. Over christmas I'll be looking into issues. Things have been rather mental lately.
(0001646)
derick (administrator)
2011-01-12 22:34

I've looked at this now, and have come up with an alternative patch. This patch does the real path checks upon the checking of the breakpoint:

http://derickrethans.nl/files/dump/xdebug-bug627-2011-01-12.diff.txt [^]

Could you please test whether it works? The patch applies cleanly to trunk, and with some fuzz/offsets to branches/xdebug_2_1.
(0001656)
toddw (reporter)
2011-01-31 20:05

Hey Derick, just looked over the patch. I'm not sure why the realpath checks need to move into the PHP breakpoint runtime check.

Note that realpath is a relatively slow call (it's a filesystem call), isn't it better to do this conversion just the once, otherwise (worse case scenario) it could be performing a realpath check on every PHP instruction?
(0001746)
toddw (reporter)
2011-05-18 23:09

Derick, do you have some comments/suggestions for post (0001656)?
(0001792)
robertbasic (reporter)
2011-08-20 22:15
edited on: 2011-08-20 22:18

Hi Derick!

You commented on my blog post (http://robertbasic.com/blog/debugging-two-php-projects-in-netbeans-at-the-same-time/ [^]) and mentioned there this symlink issue.

I forked xdebug on github, applied this patch of yours (http://derickrethans.nl/files/dump/xdebug-bug627-2011-01-12.diff.txt [^]) and when using that patched version of xdebug, I don't have the symlink issue any more under Netbeans; it works as expected - the "problem" I wrote about in the blog post is no more.

Unfortunately, my knowledge of C and PHP extensions is close to 0, so I can't really offer any other help than testing.

I'm running PHP 5.3.3. at the moment. If you need anything else, I'll do my best to help :)

Thank you for your hard work!

Edit: I've pushed the changes to a separate branch, here's the commit: https://github.com/robertbasic/xdebug/commit/1d3467d3bdb3ea05821f905097c4f310736b68c5 [^]

(0001964)
toddw (reporter)
2012-03-09 19:36

@Derick - do you have time for this breakpoint symlink issue?

If you not comfortable with the one-time realpath check when setting/removing the breakpoint, then please do go with your own patch... I'd just like to have this resolved.

Thanks,
Todd
(0001968)
derick (administrator)
2012-03-12 16:16

It's on my list, and it'll make it into 2.2.0 in some form.
(0002000)
jtyler (reporter)
2012-03-22 14:44

@Derick: I noticed that 2.2.0 is scheduled for release on 2012-03-25... Seeing as that is three days away and most of the bugs scheduled for that release are still in their 'new' status... is this still accurate, or could you give us a more up-to-date estimate on its release?

Also, do you know if the solution to this bug should work in Windows as well, or just Linux/Mac?

Thanks!
(0002009)
derick (administrator)
2012-03-24 19:13

@Jtyler, unlikely that I'll make March 25th, but working on it.
(0002034)
jtyler (reporter)
2012-04-08 20:14

Hi @Derick, I was wondering if you think this release might be ready by April 20 (about two weeks from now).
(0002037)
derick (administrator)
2012-04-08 22:44

I'm aiming for the 24th; why are you asking?
(0002039)
jtyler (reporter)
2012-04-11 18:08

It would be particularly useful for me to have this fix by April 20.

Since it's going to be released so soon, I'm trying to weigh the usefulness of it against the time required to install the necessary environment to compile the DLL from scratch with the provided patch. That's not an entirely easy task, and I haven't got much time on my hands.

Just trying to get a perspective on the situation. Thanks. :)
(0002258)
derick (administrator)
2012-06-15 11:04

toddw-as commented on 31dc7d3 (https://github.com/derickr/xdebug/commit/31dc7d385e2d18b770aff5c9bee9e1f2bf2da3bd#commitcomment-1461130 [^]):

You'll also need to add this realpath check for the breakpoint remove and modify routines, otherwise you'll never be able to delete a breakpoint you set in a symlinked file.
(0002294)
derick (administrator)
2012-06-27 22:09

What Todd wrote is incorrect. Breakpoints are deleted and updated by their ID exclusively.

- Issue History
Date Modified Username Field Change
2010-10-13 23:48 toddw New Issue
2010-10-14 01:17 toddw Note Added: 0001582
2010-10-15 19:51 toddw Note Added: 0001584
2010-12-13 05:06 weitzman Note Added: 0001621
2010-12-15 23:18 derick Note Added: 0001622
2011-01-12 22:34 derick Note Added: 0001646
2011-01-12 22:34 derick Assigned To => derick
2011-01-12 22:34 derick Status new => feedback
2011-01-31 20:05 toddw Note Added: 0001656
2011-01-31 20:05 toddw Status feedback => assigned
2011-05-18 23:09 toddw Note Added: 0001746
2011-08-20 22:15 robertbasic Note Added: 0001792
2011-08-20 22:18 robertbasic Note Edited: 0001792 View Revisions
2012-03-09 19:36 toddw Note Added: 0001964
2012-03-12 16:16 derick Note Added: 0001968
2012-03-12 16:21 derick Target Version => 2.2.0
2012-03-22 14:44 jtyler Note Added: 0002000
2012-03-24 19:13 derick Note Added: 0002009
2012-04-08 20:14 jtyler Note Added: 0002034
2012-04-08 22:44 derick Note Added: 0002037
2012-04-11 18:08 jtyler Note Added: 0002039
2012-05-05 16:33 derick Status assigned => closed
2012-05-05 16:33 derick Resolution open => fixed
2012-05-05 16:33 derick Fixed in Version => 2.2.0
2012-06-15 11:04 derick Note Added: 0002258
2012-06-15 11:04 derick Status closed => assigned
2012-06-15 11:05 derick Fixed in Version 2.2.0 =>
2012-06-15 11:05 derick Target Version 2.2.0 => 2.2.1
2012-06-27 22:09 derick Note Added: 0002294
2012-06-27 22:09 derick Status assigned => closed
2012-06-27 22:09 derick Fixed in Version => 2.2.1


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker