View Issue Details

IDProjectCategoryView StatusLast Update
0002348XdebugStep Debuggingpublic2025-05-01 14:03
Reporterderick Assigned Toderick  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.4.2 
Target Version3.4devFixed in Version3.4dev 
Summary0002348: Xdebug does not resolve breakpoints in property hooks
Description

With the following code:

<?php
$example = new class {
    public function __construct() {}

    public DateTimeImmutable $datetime {
        get {
            return new DateTimeImmutable();
        }   
        set (mixed $void) {}
    }   
};

echo $example->datetime->format("c");

Setting a breakpoint on line 7 (the line with return new DateTimeImmutable(); results in:

[4006344] [Step Debug] <- breakpoint_set -i 5 -t line -f file:///home/derick/dev/php/derickr-xdebug/tests/debugger/bug02348.inc -n 7
[4006344] [Step Debug] DEBUG: R: Line number (7) out of range (3-3).
[4006344] [Step Debug] DEBUG: R: Line number (7) in smallest range of range (1-14).
[4006344] [Step Debug] DEBUG: I: Breakpoint line (7) NOT found in set of executable lines.
[4006344] [Step Debug] DEBUG:   I: Line (8) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (9) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (10) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (11) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (12) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (6) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (5) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (4) not in set.
[4006344] [Step Debug] DEBUG:   I: Line (3) not in set.
[4006344] [Step Debug] DEBUG:   F: Line (2) in set.

IE, the breakpoint gets set on line 2 (the line with $example = new class {) as it can't find code on line 7.

TagsNo tags attached.
Operating System
PHP Version8.3.5-8.3.9

Activities

Issue History

Date Modified Username Field Change
2025-05-01 13:34 derick New Issue
2025-05-01 13:36 derick Status new => confirmed
2025-05-01 13:36 derick Description Updated
2025-05-01 14:03 derick Assigned To => derick
2025-05-01 14:03 derick Status confirmed => closed
2025-05-01 14:03 derick Resolution open => fixed
2025-05-01 14:03 derick Fixed in Version => 3.4dev
2025-05-01 14:03 derick Note Added: 0007269