Avoid Proxy objects in debug statements for a Lightning component

Here is how I generally work in chrome when i see a proxy object,

Use the chrome "store as global variable" on the proxy object as shown in the below screenshot

enter image description here

Then I just use the Javascript object.keys() and add a bit of Javascript in the console like below to print keys

for (let key of Object.keys(temp1)) {
        console.log(key + temp1);
}

That gets me what I need and then most of the times , I just have to rely on JSON.stringify() to see the output .

enter image description here


This will get it out of proxy and back into nice, readable format.

console.log(JSON.parse(JSON.stringify(myObject)));

Used it so much I made a snippet of it (vscode, sublime, maybe others)

"xlog": {
    "prefix": "xlog",
    "body": [
        "console.log(JSON.parse(JSON.stringify(${1:var}));"
    ],
    "description": "logs json stuff through proxy"