View Issue Details

IDProjectCategoryView StatusLast Update
0000627XdebugUncategorizedpublic2012-06-27 21:09
Reportertoddw Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.1.0 
Target Version2.2.1Fixed in Version2.2.1 
Summary0000627: breakpoints set in symlinked files are ignored
Description

Any 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

Activities

toddw

2010-10-14 00:17

reporter   ~0001582

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?

toddw

2010-10-15 18:51

reporter   ~0001584

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

weitzman

2010-12-13 05:06

reporter   ~0001621

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.

derick

2010-12-15 23:18

administrator   ~0001622

Sorry guys, I missed this. Over christmas I'll be looking into issues. Things have been rather mental lately.

derick

2011-01-12 22:34

administrator   ~0001646

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.

toddw

2011-01-31 20:05

reporter   ~0001656

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?

toddw

2011-05-18 22:09

reporter   ~0001746

Derick, do you have some comments/suggestions for post (0001656)?

robertbasic

2011-08-20 21:15

reporter   ~0001792

Last edited: 2011-08-20 21: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

toddw

2012-03-09 19:36

reporter   ~0001964

@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

derick

2012-03-12 16:16

administrator   ~0001968

It's on my list, and it'll make it into 2.2.0 in some form.

jtyler

2012-03-22 14:44

reporter   ~0002000

@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!

derick

2012-03-24 19:13

administrator   ~0002009

@Jtyler, unlikely that I'll make March 25th, but working on it.

jtyler

2012-04-08 19:14

reporter   ~0002034

Hi @Derick, I was wondering if you think this release might be ready by April 20 (about two weeks from now).

derick

2012-04-08 21:44

administrator   ~0002037

I'm aiming for the 24th; why are you asking?

jtyler

2012-04-11 17:08

reporter   ~0002039

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. :)

derick

2012-06-15 10:04

administrator   ~0002258

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.

derick

2012-06-27 21:09

administrator   ~0002294

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

Issue History

Date Modified Username Field Change
2010-10-13 22:48 toddw New Issue
2010-10-14 00:17 toddw Note Added: 0001582
2010-10-15 18: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 22:09 toddw Note Added: 0001746
2011-08-20 21:15 robertbasic Note Added: 0001792
2011-08-20 21:18 robertbasic Note Edited: 0001792
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 19:14 jtyler Note Added: 0002034
2012-04-08 21:44 derick Note Added: 0002037
2012-04-11 17:08 jtyler Note Added: 0002039
2012-05-05 15:33 derick Status assigned => closed
2012-05-05 15:33 derick Resolution open => fixed
2012-05-05 15:33 derick Fixed in Version => 2.2.0
2012-06-15 10:04 derick Note Added: 0002258
2012-06-15 10:04 derick Status closed => assigned
2012-06-15 10:05 derick Fixed in Version 2.2.0 =>
2012-06-15 10:05 derick Target Version 2.2.0 => 2.2.1
2012-06-27 21:09 derick Note Added: 0002294
2012-06-27 21:09 derick Status assigned => closed
2012-06-27 21:09 derick Fixed in Version => 2.2.1
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized