View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002211 | Xdebug | Step Debugging | public | 2023-11-09 14:27 | 2023-11-30 14:50 |
Reporter | Zobo | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.2.2 | ||||
Fixed in Version | 3.3.0 | ||||
Summary | 0002211: File wrappers get wrong filename location in stack. | ||||
Description | I was researching this issue https://github.com/xdebug/vscode-php-debug/issues/931 that caused a crash with Xdebug 3.1 and ran into a strange situation. The user describes that they are using laravel/serializable-closure . Not to bore you with details, this packages uses a custom stream wrapper to store the body of a closure and then include it for execution. The problem that I found is that Xdebug reports an invalid path in the stack trace. I was able to make a very small script to reproduce it. I used the built in data:// stream wrapper to avoid extra code. | ||||
Steps To Reproduce | You need to set -ddallow_url_include=1 <?php function f2() { debug_print_backtrace(); } Note, I added f2() function so i could show the output of debug_print_backtrace() #0 data://text/plain;base64,PD9waHAKcmV0dXJuIGZ1bmN0aW9uKCkgewpmMigpOwp4ZGVidWdfYnJlYWsoKTsKcmV0dXJuICdYWFhYJzsKfTs=(3): f2() run -i 12 stack_get -i 13 | ||||
Additional Information | I think Xdebug should return Good question what a IDE could do with this.... Ideally if would return filename="dbgp://..." but then this means it would need to store the content somewhere - like with eval() | ||||
Tags | No tags attached. | ||||
Operating System | win/linux | ||||
PHP Version | 8.2.0-8.2.9 | ||||
|
Or maybe DBGP source could be used regrades? I need to test. |
|
This actually does work! |
|
Proposing fix https://github.com/xdebug/xdebug/pull/921 |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-11-09 14:27 | Zobo | New Issue | |
2023-11-09 14:33 | Zobo | Note Added: 0006677 | |
2023-11-15 17:52 | Zobo | Note Added: 0006678 | |
2023-11-15 17:52 | Zobo | File Added: image.png | |
2023-11-15 17:52 | Zobo | File Added: image-2.png | |
2023-11-15 23:32 | Zobo | Note Added: 0006679 | |
2023-11-30 10:41 | derick | Assigned To | => derick |
2023-11-30 10:41 | derick | Status | new => closed |
2023-11-30 10:41 | derick | Resolution | open => fixed |
2023-11-30 10:41 | derick | Fixed in Version | => 3.3dev |
2023-11-30 14:50 | derick | Fixed in Version | 3.3dev => 3.3.0 |