61

Referred to as the "JavaScript console", when you click on a link, the log is cleared.

Is there a way to stop this log from being cleared when you click on a link?

The problem is that an event triggered onClick is returning an error which makes it harder to diagnose because the error is only displayed for a short time before being cleared.

Thanks.

HM2K
  • 1,461
  • 4
  • 16
  • 21
  • I think this is the answer: http://code.google.com/p/chromium/issues/detail?id=89965 – HM2K Aug 19 '11 at 16:04
  • 1
    possible duplicate of [How to make Google Chrome JavaScript console persistent?](http://stackoverflow.com/questions/5327955/how-to-make-google-chrome-javascript-console-persistent) – Andrey Mikhaylov - lolmaus Aug 27 '14 at 20:16

3 Answers3

56

This is an option in the developer tools. Right click the console, and select Preserve Log upon Navigation, or go through the settings menu (bottom right cog-looking icon in the devtools).

pic

Shashanth
  • 4,995
  • 7
  • 41
  • 51
Boris Smus
  • 8,220
  • 2
  • 36
  • 33
  • Right click where on the console? When I right click in most places on the console I just see: "Inspect element". I could not see a cog in the bottom right under "chrome://settings/browser". Are you sure this is Google Chrome? – HM2K Aug 19 '11 at 16:01
  • 2
    You need to open the developer tools with Ctrl + Alt (or Cmd + Option) + I. – Boris Smus Aug 19 '11 at 19:05
  • 5
    As of Chrome 70 (and maybe before that) the settings cog is at the top right of the console window. Click it, and then click 'Preserve log'. – cmgharris Nov 14 '18 at 11:14
41

Google Chrome Version: 65.0.3325.146 (Official Build) (64-bit)
Under the Network tab check Preserve Log

enter image description here

Google Chrome:Version 39.0.2171.95 (64-bit)
Console -> Settings -> Preserver log enter image description here

dsharew
  • 10,377
  • 6
  • 49
  • 75
  • 2
    This has now moved. Press the blue cogwheel at the top right of the Console, then tick Preserve log. – clayRay Oct 23 '19 at 00:29
7

enter image description here

katspaugh
  • 17,449
  • 11
  • 66
  • 103
  • That cog does not exist on my version: "Google Chrome is up to date (13.0.82.112)". What version are you using? – HM2K Aug 21 '11 at 11:30
  • Chromium 15.0.846.0 (Developer Build 95631). http://build.chromium.org/f/chromium/snapshots/ – katspaugh Aug 21 '11 at 11:43