Safari Developer Tools: How to Preserve Console Log Upon Navigation?

38,436

Solution 1

I don't know when this was added, but it is present in Safari on El Capitan (Safari 9.0). It works the same as in Chrome (right click in the console window and select "Keep Log on Navigation").

Update: As per Daniel Compton's answer, in Safari 11+ this is now under the settings icon as 'Console: Clear when page navigates'.

Update: The setting is now back to "Preserve log" in the Network tab in the developer console in Safari 14+

Solution 2

In Safari 11.1.2 they moved it again(!) back to the Console tab under the "Preserve log" checkbox. The Network log has similarly moved back to the Network tab.

Console tab


In Safari 11 they moved it to the Settings panel under "Console: Clear when page navigates". It also has a sister setting "Network: Clear when page navigates".

enter image description here

Solution 3

No, there is no such feature (in Safari 5.0 at least). Looking at some Google results, I don't think this feature exists in any Safari version.

Share:
38,436
Zorayr
Author by

Zorayr

I have been writing code since I as 12! Currently, working on my own startup — we're hiring! Previously, Eng Manager at Facebook, Microsoft, Amazon.

Updated on February 06, 2021

Comments

  • Zorayr
    Zorayr over 3 years

    When using Safari Web Inspector to read the JavaScript console output, the log is reset upon navigation i.e. going from page index.html to mail.html clears the console output. In the Chrome Developer Tools, I can easily preserve the log by right clicking on the console space and selecting Preserve Log Upon Navigation. With this option, console log output remains intact until I manually clear the output simplifying the process of debugging JavaScript that refreshes or redirects to another page.

    Is there a similar feature in Safari Web Inspector?

  • Neta Meta
    Neta Meta over 7 years
    safari 5 is ancient, i assume your on windows and there for using 5
  • joseantgv
    joseantgv over 7 years
    They could have hide it a bit more!
  • Aurelio
    Aurelio about 7 years
    The location of this setting does not even make sense... why is it in the console tab and not in the network or the general settings? Anyway many thanks for the answer.
  • Matthias
    Matthias over 6 years
    As Daniel Compton points out, as of Safari 11 this is no longer the case. Please see his answer for recent instructions.
  • gekkedev
    gekkedev over 4 years
    Unfortunately both options don't seem to be available in Safari 7.1 - I guess I should upgrade.
  • london_utku
    london_utku over 3 years
    This is the latest still, why the button is surfing through the tabs anyways.