1

I had lost form data on a website (Chrome/macOS), and was unable to follow the recommended resolution for Linux/Mac due to SIP being enabled (relevant comment). However, the associated page/tab was still open.

Through a bit of debugging, I was able to recover the lost data. I'll post my steps as a possible answer (but won't mark as accepted unless there's no better alternative).

My question: is there a better/easier way to get at that lost data? (without requiring a time machine to go back and install a browser add-on / disable SIP prior to the event?)

1 Answer 1

3

Don’t close the tab you lost data on.

  1. Open Chrome dev tools on the affected tab (F12).
    1. Click the “Memory” tab.
    2. Select “Heap snapshot”.
    3. Click “Take snapshot” (this may take a while).

 

  1. Select the newly created heap snapshot on the left navigation bar (likely named “Snapshot 1”).
    1. In the “Constructor” UI section, locate and expand the “(string)” drop-down (or set the “Class filter” to “string”).
    2. Click the “Show all {int}” button (you will need to scroll down through the top level strings).

 

  1. Now the hard part:
    1. Hit ctrl/cmd + f to search for some part of the string you remember (try to only use 0-9/a-z characters, and near the beginning of the field - since strings are truncated).
    2. You may (or may not) find the string you’re looking for.
      • If not, play around with the search params (or manually scroll through all the string results).
      • If you do find the search result, it might not be the full string you’re looking for.
    3. Once you’ve selected the found string (in the “Constructor” section):
      1. In the “Object” section, hover over the first top level blue variable name (can be named anything).
      2. A pop-up should appear with the full string value.
        • If it doesn’t, you may need to scroll down in the “Object” section looking for another top level blue variable to inspect (by hovering over their name).
      3. Double click the string value to highlight, and then copy the results.
2
  • As it's been 5 months with no alternative solutions proposed since this answer was posted, I'm going to mark it as solved. If anyone knows of a better solution, please add it! Commented Oct 19, 2022 at 17:23
  • So uh...any idea what to do when the Chrome tab is a blank white from a memory freeze, and you can't open the dev tools? Commented Jun 27 at 23:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .