View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002405 | Xdebug | Path Mapping | public | 2026-02-16 15:20 | 2026-02-16 15:20 |
| Reporter | mho22 | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 3.5.1 | ||||
| Summary | 0002405: Handle minimum path in .xdebug directory discovery | ||||
| Description | This is some kind of unusual behavior but I stumbled upon this lately in one of my use cases. This is why I wanted to suggest this pull request. It is mainly focused on the .xdebug directory discovery for path mappings/skippings. Long story short : It couldn't find my .xdebug directory located at the root of my environment. Here is a more precise use case : Based on these lines in src/lib/maps/maps.c > line 183 : current_dir = parts->c > 2 ? xdebug_join(slash, parts, 0, parts->c - 2) : NULL; If my current debugged file is /foo/bar/baz/qux/file.php, then : file_path = "/foo/bar/baz/qux/file.php" current_dir = "/foo/bar/baz/qux" If my current debugging directory is /foo/bar/file.php, then : file_path = "/foo/bar/file.php" current_dir = "/foo/bar" My suggestion would be to simply replace > with >=. Currently it gives this : file_path = "/foo/bar/file.php" current_dir = "/foo/bar" [42] [Path Mapping] INFO: Scanning for map files with pattern '/foo/.xdebug/.map' While with my suggestion : file_path = "/foo/bar/file.php" current_dir = "/foo/bar" What do you think? | ||||
| Tags | No tags attached. | ||||
| Operating System | macOS 26.3 | ||||
| PHP Version | 8.5.0-8.5.4 | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-02-16 15:20 | mho22 | New Issue |