Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
How can I see which variables are specifically in memory used by JavaScript through devtools (chrome, Edge, etc.)?

Is this possible? I only want to see if x variable is in memory or not (I don't want to see the total memory usage, etc.), for example, I want that when pressing a button, a boolean variable is initialized, before to set that variable, obviously there is nothing in memory, but after pressing the button, it should now be in memory (and do the same in reverse), how can I see if that variable is actually in memory or not, in the development tools?

I have seen videos on YouTube that do this same exercise and simply put the name of the variable in the search filter of the memory tab (after taking a snapshot) and it appears if it is in memory or not, but when I do it the variable does not appear to me.

let myBoolean; // this can be a number, string, array, etc.

document.getElementById('add').addEventListener('click', () => {
    myBoolean = true;
});

document.getElementById('remove').addEventListener('click', () => {
    myBoolean = null;
});

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Yes. At first, you need to run your code in the browser and create some objects. After you will be able to find it in the memory snapshot.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!