Skip to content

Commit 4b8e953

Browse files
authored
Add instructions for taking a state dump (#469)
1 parent a174ec7 commit 4b8e953

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/state_dump.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# How to take a State Dump
2+
3+
Sometimes a UI bug is hard to reproduce, but we'd like to rapidly develop against the application state that caused the bug.
4+
5+
In this case, a MetaMask developer will sometimes ask a user with a bug to perform a "state dump", so we can use some internal tools to reproduce and fix the bug.
6+
7+
To take a state dump, follow these steps:
8+
9+
1. Get the MetaMask popup to the point where it shows the bug (the developer will probably specify exactly where).
10+
2. Right click on the extension popup UI, and in the menu, click "Inspect". This will open the developer tools.
11+
3. In case it isn't already selected, click the "Console" tab in the new Developer Tools window.
12+
4. In the console, type this command exactly: `logState()`. This should print a bunch of JSON text into your console.
13+
5. Copy that printed JSON text
14+
6. *Optional*: Annonymize that text if you'd like (you may change all instances of an account address to another valid account address, for example) We may automate the anonymization in the future.
15+
7. Send that JSON text to the developer, ideally pasting it in the issue regarding the bug.

0 commit comments

Comments
 (0)