vscode-php-debug icon indicating copy to clipboard operation
vscode-php-debug copied to clipboard

Feature request: add advanced copy variable values

Open bborrel opened this issue 5 years ago • 1 comments

PHP version: 7.2.32 XDebug version: 2.9.6 Adapter version: 1.13.0

Problem: Copying variables of compound types (ie arrays and objects) from the variables panel is not possible. When right-clicking on such a variable, we can not Copy value nor Copy expression.

For an array, copying as value gives 'array(n)', whereas the return value of print_r, var_export or json_encode would be useful to then paste it in a script.

For objects, copying as value gives the variable class name, whereas the return value of print_r, var_export or json_encode would be useful to then paste it in a script.

Solution: As written in https://github.com/microsoft/vscode/issues/27950#issuecomment-613281366, advanced copy variable values is now supported in VSCode. And it's up to the debugger to implement it in order to add the ability of advanced copy variable values.

Relates to:

  • https://github.com/felixfbecker/vscode-php-debug/issues/400

bborrel avatar Dec 16 '20 00:12 bborrel

Will currently be implemented as var_export.

zobo avatar Jul 23 '23 07:07 zobo