var-dump icon indicating copy to clipboard operation
var-dump copied to clipboard

Copy tools

Open eduwass opened this issue 1 year ago • 1 comments

Hi @rodber

Just found this and wanted to say thank you, it looks like an awesome tool.

Have you considered adding copy tools, eg: copy the whole dumped structure, or the path to a specific item in an object?

Something like was what I had in mind:

  • Copy object to clipboard (copies full dump to clipboard)
  • Copy path / Copy value (shows next to element line)

Or is this out of scope since the tool is JS-free?

Thanks and great work!

eduwass avatar Apr 09 '25 14:04 eduwass

Hello @eduwass, thanks for your message.

VarDump goal is to provide a common/predictable output for all dump representations (html, cli, plain). The zero JS comes from the fact that it folds data structures using only HTML/CSS, contrary to Symfony's which requires JS. This is just because VarDump is newer, so I took advantage of modern HTML. More interactivity is always welcome.

I already have another project where I use VarDump's output and on top of that provide more interactivity: https://github.com/xrdebug/xrdebug (open with editor, pause, manage messages, use filters, etc)

xrdebug-1 1 0-demo-light

The xrDebug software is basically a dedicated GUI for VarDump where it is way easier to add interaction. You can find the relevant packages here:

  • https://github.com/xrdebug/php
  • https://github.com/xrdebug/wordpress

Feel free to describe your ideal use case to determine what we could add here.

rodber avatar Apr 09 '25 15:04 rodber