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

feat: support clipboard context on variable copy operation

Open zobo opened this issue 2 years ago • 3 comments

When the IDE requests evaluation with clipboard context use var_export to format the response

zobo avatar Jul 22 '23 10:07 zobo

Codecov Report

Merging #917 (1773ad8) into main (4df70ce) will increase coverage by 0.27%. The diff coverage is 91.30%.

@@            Coverage Diff             @@
##             main     #917      +/-   ##
==========================================
+ Coverage   67.00%   67.28%   +0.27%     
==========================================
  Files          14       14              
  Lines        1982     2005      +23     
  Branches      389      395       +6     
==========================================
+ Hits         1328     1349      +21     
- Misses        654      656       +2     
Impacted Files Coverage Δ
src/xdebugConnection.ts 82.03% <86.66%> (+0.17%) :arrow_up:
src/phpDebug.ts 62.93% <100.00%> (+0.41%) :arrow_up:

codecov[bot] avatar Jul 22 '23 10:07 codecov[bot]

Using eval here causes issues, for example, when accessing private properties. Also it does not have support for stack depth. https://bugs.xdebug.org/view.php?id=1342 A correct implementation would be to implement var_export in JS and fetch data via property_get/property_value

zobo avatar Jul 24 '23 10:07 zobo

I'd love to see this implemented. 👀

eduwass avatar May 28 '24 07:05 eduwass