Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari Web Inspector - Long string values truncated

In Safari (9.1), I am looking at a long string value (should be about 500 characters), but only shows me the first hundred or so followed by "...".

I think it's just a local setting because I have another machine running safari and I can see more on it. I can't find it nor anything in the Google.

Thanks!

like image 220
danielc Avatar asked Mar 29 '16 16:03

danielc


2 Answers

Right click on the string and select "Log value". This will print the full string to the console.

like image 197
Luke Worth Avatar answered Nov 02 '22 05:11

Luke Worth


I had the same problem with Safari 13.0.2 where the log messages were cut short. But it only cuts messages if the message is not the first argument of the log function:

console.log('first log string', 'second log string')

The first argument will not (never?) be shortened. The second however will be truncated to about a 100 characters.

So if you have access to the code which does the logging, put everything inside the first argument and you should see the whole messages.

console.log('first log string' + 'second log string')

like image 34
Philipp Avatar answered Nov 02 '22 05:11

Philipp