baszak baszak - 1 year ago 514
Javascript Question

copy paste big dictionary into chrome console

what im essentially doing is

var dictionary = [ HERE I PASTE ALMOST 200k ENTRIES ]

and it throws :

Error saving setting with name: consoleHistory, value length: 8613059.
Error: Failed to set the 'consoleHistory' property on 'Storage':
Setting the value of 'consoleHistory' exceeded the quota.

Ten largest settings: Setting: 'consoleHistory', size: 2872834
Setting: 'previouslyViewedFiles', size: 5462 Setting:
'networkLogColumnsVisibility', size: 378 Setting:
'dataGrid-networkLog-columnWeights', size: 340 Setting: 'userAgent',
size: 146 Setting: 'Inspector.drawerSplitViewState', size: 94 Setting:
'selectedAuditCategories', size: 79 Setting:
'sourcesPanelNavigatorSplitViewState', size: 65 Setting:
'sourcesPanelSplitViewState', size: 65 Setting:
'InspectorView.splitViewState', size: 42

I want to use the dictionary later to search for things and I hit the wall here.

Answer Source

The console history is a record of everything that is executed in the console. so every time you're entering the 200k you are appending that to the history. LocalStorage space cant be adjusted its set to 5MB, but as long as your entry is under that and you are just entering it once then this shouldn't be a problem.

You can delete the console history to free up space.
The devtools is just another window so it can be inspected and modified like any other webpage.

Open Dev Tools

  • Select More Tools > Developer Tools from the Chrome Menu.


  • Right-click on a page element and selecting "inspect element" in the context menu


  • Use Ctrl/Cmd+Shift+I

Inspect Dev Tools window.

  1. In another tab/window navigate to chrome://inspect/#other.
  2. Locate the page which starts with "chrome-devtools://devtools/bundled/"
  3. Click the relevant inspect link.

This will open another devtools window where you can inspect and modify the devtools.

Remove consoleHistory form LocalStorage

Navigate to the newly opened devtools window.

Unfortunately typing localStorage.removeItem('consoleHistory'); into the console doesn't work;

So you have to do it the long way.

  1. Open "Resources" panel
  2. Expand "Local Storage" either by double clicking "Local Storage" or click the arrow.
  3. Select the called "devtools://devtools" table. (As its full, it may take a while to open)
  4. locate and select the key called 'consoleHistory'
  5. Hit delete or the "X" button.

Note. This answer has been updated to apply to version 46.0.2490.86. some details my have changed since posting. Please leave a comment if this method no longer applies.

If you are using an older version of chrome and this does not work for you then there is an additional few steps you have to take before using this method. You can find them here .

you can find your version at chrome://chrome/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download