Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Safari javascript console to file?

Is it possible to save out the javascript console in Safari Web Inspector to a file? I can't find any way to do it, and the only way to select all is to drag with the cursor (very difficult when I have a long continuous stream of log output).

like image 746
Mark Wang Avatar asked Mar 19 '13 18:03

Mark Wang


People also ask

How do you save a node JS console output to a text file?

node.js_output_to_file.txt Just run the script in your terminal like this... This tells the shell to write the standard output of the command node script-file. js to your log file instead of the default, which is printing it to the console. This is called redirection and its very powerful.

Does Safari have a JavaScript console?

Apple Safari To do that, go into Safari's preferences (Safari Menu > Preferences) and select the Advanced Tab. Once that menu is enabled, you will find the developer console by clicking on Develop > Show Javascript Console. You can also use the shortcut Option + ⌘ + C .


2 Answers

I figured something out:

While holding down SHIFT, select the start of the part you want. Then release SHIFT and scroll down with the scrollbar.

Shift-click again on the end of the selection. Then you can copy/paste as needed.

like image 177
Mark Wang Avatar answered Sep 18 '22 23:09

Mark Wang


Click inside the console, s. There is no step 3.

Note that this saves the output in plain text so there's no colorization, highlighted fields, etc.

like image 26
VxJasonxV Avatar answered Sep 17 '22 23:09

VxJasonxV