Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove "debugger eval code" at the end of the output in console

I'm using Firefox 66.0.3.

When I execute the following snippet

[1,1,5,76,7,8,8,85,8,5,85,5,5,55].forEach(x => console.log(x))

or whatever code that has console.log() the browser shows debugger eval code at the end of the line in the output.

example image

How to remove "debugger eval code" from output?

like image 971
mihkov Avatar asked Oct 30 '25 00:10

mihkov


2 Answers

Unfortunately there is no way (at this date) to disable that but there is a way for solving your problem

Define an array with one "\n" element:

temp = ["\n"]

Add each of your message with "\n" at end to array

temp.push(message+"\n")

Then log the array with spread operator

console.log(...temp)

now you log your whole messages with just ONE eval code

you can now easily select all the log without eval code because of first "\n" element

like image 167
Ben Izd Avatar answered Oct 31 '25 15:10

Ben Izd


Join your list with line breaks:

console.log([1,1,5,76,7,8,8,85,8,5,85,5,5,55].join('\n'))

You can then safely copy the result without the debugger eval code strings.

like image 24
z11i Avatar answered Oct 31 '25 14:10

z11i



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!