How do I copy console.log output from a browser?

such as the title.
for example, a lot of content, want to format, solve the problem.
Note: now it is the result of JSON.stringify. Because there is too much data, you simply want to copy all the data in Ctrl + C, and manual operation is very troublesome.

the figure is as follows:
483385-20170731211908115-1258637534.png

Dec.24,2021

right mouse button, there will be a store as global variable

Click console and a temp1 variable appears, then copy (temp1). Copy it and pull it successfully. Just find the place Ctrl + v


if it is an object, JSON.stringify () print it out and copy it.

you might as well change the question to how to copy and paste

data = {a:1}
input = document.createElement('input')
input.value = JSON.stringify(data)
document.body.appendChild(input)
input.select()
document.execCommand('copy')
input.remove()

your output is not controlled by you?
is not controlled by your code?

. I don't have enough get on this question
. And copy the right mouse button has a copy


where do you want to copy and see from the console?


if it is an ordinary js object, just use JSON.stringify , but note that the method will not be output

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b428a4-2bd9b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b428a4-2bd9b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?