can I prevent Chrome from truncating strings in the dev console?

I recently discovered that the Chrome dev tools has a copy function which copies to clipboard - without truncation! Handily it also serializes objects to JSON and DOM elements to HTML, straight to the clipboard.

copy(someLongString); // no truncation!
copy({ foo : true }); // JSON
copy(someDOMElement); // HTML

Since I was trying to copy a long string to clipboard for analysis elsewhere, this served my needs perfectly


console.dir(longstringhere) works.

copy didn't work for me either, it was saying it's undefined.


This behavior still exists in Chrome Version 37.0.2062.103.

You can get around this while debugging by using: document.write('My Really Long Debug Text');