View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001964 | Xdebug | Step Debugging | public | 2021-04-11 18:52 | 2025-11-25 14:22 |
| Reporter | Zobo | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | feedback | Resolution | open | ||
| Platform | Windows | OS | Windows | OS Version | 10 |
| Product Version | 3.0.4 | ||||
| Target Version | 3.6dev | ||||
| Summary | 0001964: WSL UNC paths don't have needed prefix | ||||
| Description | I just ran into an issue where Xdebug is presenting a UNC path in such way I cannot map it back to original. I executed a script from an UNC path \WSL$\UBUNTU\home\zobo\php\test1.php Looking at phpinfo() output, php is OK with it:
However Xdebug presents the files as:
Also true for stack:
I am not sure if this is true in case of network mapped UNC paths, but I have a strong suspicion it is. See: https://github.com/xdebug/vscode-php-debug/issues/546 In case it's a normal "windows path" the url becomes Was this already encountered? | ||||
| Tags | No tags attached. | ||||
| Operating System | |||||
| PHP Version | 8.0.0-8.0.4 | ||||
|
|
I read this https://en.wikipedia.org/wiki/File_URI_scheme and am considering this os actually correct... |
|
|
Upon further debugging I did find other strange things: First the case is strange: If I try to set a breakpoint: [50420] [Step Debug] <- breakpoint_list -i 3 It's treated as relative path... This should not be valid in URL context. So in case of windows UNCs I think the syntax should really be encoded as file:////host/path.... I guess this is a far more complex issue than I hoped for... However not being able to set a breakpoint for a UNC path is IMO a bug. |
|
|
Xdebug handles UNC paths, and prefixes them with file:// : https://github.com/xdebug/xdebug/blob/master/src/lib/usefulstuff.c#L310-L313 This is an implementation of a specification on the MSFT website: https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows Which says:
And this is exactly what Xdebug does. So I also don't think there is a bug here. |
|
|
I still don't know what to do here... either break "Proper Syntax" that Windows and Wikipedia explain, or ignore it and suggest people mount their drive with a drive letter. |
|
|
While "WSL$" has correct casing, I wonder, what was the correct casing for "Ubuntu"? As for PHP's output, it uses what was passed to it. |
|
|
Hi derick, the problem is that a unc path is requested and at a single point in log file this address is interpreted as local windows file path. requested: file://139.138.58.141/phpinfo.php |
|
|
Hi all. Cannot find file ‘/home/svante/projects/myproject/bin/cli.php’ locally In the xdebug log I get entries like: [11181] [Step Debug] <- breakpoint_set -i 15 -t line -f file:////wsl.localhost/Ubuntu/home/svante/projects/myproject/bin/cli.php -n 10 I tried mapping wsl to w:\, which makes little difference. [1543] [Step Debug] <- breakpoint_set -i 15 -t line -f file://W:/home/svante/projects/myproject/bin/cli.php -n 15 I see that you have a "target version" to solve this problem that is set to 3.4dev, but I guess this just is default for "next version", or something like that. |
|
|
An extra note. In the above I focused on cli. In fpm it actually works, mapped to w:\ or not, until I press F9 (resume program). |