DEV Community

Peter Ellis
Peter Ellis

Posted on

5

I was today() years old when I found out...

The other day I was debugging a page in Chrome: I was staring at a really complex object that had just been logged to the console, looking for a field with a specific name. If only they'd stringified it before logging, I could then copy it into an editor.

So I just lazily right-clicked the object and...

Store as global variable

How had I missed this before?

...and we've got the object as  raw `temp1` endraw !

I could now call JSON.stringify(temp1) and the field is mine!

Of course I checked in Firefox two minutes later and found out they'd implemented not just this feature but "Copy object" too, which would reveal the JSON in a single step.

But I'll still treasure "Store as global variable" because it also allows you to manipulate said object or call functions.

Ignorance is like a very loud jackhammer, it feels great to take a step away from it.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (1)

Collapse
 
deciduously profile image
Ben Lovy

Ignorance is like a very loud jackhammer

I'm going to remember this one.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay