Possibility to copy binary value while debugging

By Mykola (Nick) Tkachenko on 22 Sep 2017

It can be useful to have possibility to have binary data copied to clipboard when clicking "Copy Value" on variable while debugging. Currently it copies text "Binary Data (xxxx bytes)"

Kilian Hekhuis22 Sep 2017

The problem is that currently it copies everything exactly as displayed on the screen, instead of the values as they are really present. E.g. strings are copied including quotes, dates including hashes etc. This is more of a bug than a feature...

Justin James23 Sep 2017

I think the bigger issue is that the binary data could be huge, and actually transferring it to the local computer could take a LONG time.

Also, what are you going to PASTE binary data into? A hex editor? Not sure how this would be used.


Kilian Hekhuis23 Sep 2017

Well, I wouldn't be worried about the downloading times, if I can download a random file from the internet at 10Mib/s, surely the download wouldn't take ages.

The pasting, well, you could I guess paste an image in an image editor or the like?

Justin James23 Sep 2017

1. You'll worry when the Service Studio window locks up until it finishes downloading the file.

2. Nope. That's not how the Clipboard works. If it was an image, you can't just copy binary content to the Clipboard and paste it into an image editor and the editor will magically decode the image. Instead, you place a *Windows bitmap* into the Clipboard, and the paste gets the bitmap. Applications can also register their own formats for pasting within the application, or perhaps between applications from the same company. This is how I can open a PSD in Photoshop, copy, then go to an application that can't read PSDs (say, Windows Paint), paste, and it works. Photoshop will load a generic Windows bitmap to the clipboard, and also something Adobe-specific with more information in case you paste into Illustrator, another Photoshop image, etc. But none of these are accepting just binary input, the clipboard equivalent of "application-x/octet-stream".

#2 is why copy/paste of binary content is useless. Literally the only application I can think of that will allow the paste of raw binary content and do something useful with it is a hex editor.


Justin James23 Sep 2017

To clarify #1\: a primary tenant of the clipboard is "when the user says 'copy/cut', the application locks until the content is on the clipboard", because the LAST THING ANYONE WANTS is to THINK that they copied, but the clipboard still has the wrong content, or no content. So applications ALWAYS lock until the clipboard data is there. In this case, it would need to download the content from the server. And yes, YOU may have a great connection to YOUR servers. What about someone in Brazil working in OutSystems cloud? What about my teams in the UK or Lithuania accessing our servers in the US? What happens when the data in question is a 100 MB file? Etc. etc. etc. None of that works well.