View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002243 | Xdebug | Step Debugging | public | 2024-02-06 06:20 | 2024-02-08 17:47 |
| Reporter | tm8544 | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | not fixable | ||
| Product Version | 3.3.1 | ||||
| Summary | 0002243: Adding variables with special characters in var name to watch | ||||
| Description | <?php $Sää = "something"; With the code above, watched variables become $S and $TemperatureIn Windows 11 X64 | ||||
| Steps To Reproduce | Open attached file in VsCode, add breakpoint to line 7, start debugging, add $Sää and $TemperatureIn°C to watch. | ||||
| Tags | No tags attached. | ||||
| Operating System | Windows 11 x64 | ||||
| PHP Version | 8.3-dev | ||||
|
|
Could you provide a debugging log as well? It is explained at https://xdebug.org/reporting-bugs#step-debugger on how to make one. |
|
|
debug.log contains following actions: setting breakpoint, adding two variables to watch, editing expressions |
|
|
I can't reproduce this: https://derickrethans.nl/files/dump/2024-02-07_09-40-54.gif Your log also shows the right watches for these two variables, but also the "wrong" ones. If I just right click on the variable, and do "Add to watch" it indeed cuts of the weird characters. But that's not an Xdebug issue — perhaps something in either VS Code, or the plugin: http://derickrethans.nl/files/dump/2024-02-07_09-45-34.gif |
|
|
This indeed is a problem of VS Code. However the good news is that VSCode, when clicking the "Add to Watch", tries to delegate the decision to language extensions via the EvaluatableExpressionProvider (https://code.visualstudio.com/api/references/vscode-api#EvaluatableExpressionProvider). My https://marketplace.visualstudio.com/items?itemName=zobo.php-intellisense does support this and here is an example of the messages exchanged:
I recently helped publish https://marketplace.visualstudio.com/items?itemName=phpactor.vscode-phpactor but that one is still missing this feature - I hope to get it in there soon. |
|
|
@derick, you couldn't reproduce it because you selected the variable before adding to watch. Normally, adding to watch does not require selecting a simple variable name. On certain cases, eg for part of an array like $a[1][2] you need to select it, if you want to add that single item of array $a, not all of $a. |
|
|
My second video/GIF did show I could reproduce this. But it's not on Xdebug's side, so I can't do anything about it. |
|
|
Ok, I have created an issue to https://github.com/microsoft/vscode/issues |