Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

278
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda