Search code examples
phplinuxvisual-studio-codexdebug

"Copy Value" when debuging in Visual Studio Code with Xdebug (PHP) it copy type of the variable


when I'm debugging in Visual Studio Code (Linux), working in PHP, and right-click a variable, then click "copy value", it copy the type of the variable instead of content of the value, it occurs with objects and arrays. According to this video it works fine with Javascript, I don't know if it's a bug related to I'm working with PHP, or I'm doing something wrong?.

Example: I right-click an array variable, then "Copy Value", and when I paste it, it shows "array(11)". Show example

I am expecting that "Copy Value" copy all data of arrays and objects, not only the type of variable.


Solution

  • I found this issue reported in the Xdebug project page. It's something that has been reported since 2020 here, and there is a feature request here. OK, if someone like me is wondering, it's a known bug, but it seems not to be a priority for Xdebug developers.