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

128
Visualizações
Javascript debugging with parallely looking into the message queue

I have learnt about the 'eventloop' and 'message queue' recently and now having pretty much idea about how the event loop helps to execute the methods that are queued in 'message queue' once the stack got empty. But am having one doubt here, while debugging the methods which are available in stacks in chrome browser, Is there is anyway we can identify what are the methods that are present in 'message queue' upto current debug point and which are going to execute by event loop once the current stack is empty.? Correct me if my question is wrong or my understanding is wrong because am new to these topics.

For Example:

const sayHello = () => console.log("Hello");

const sayBye = () => console.log("Bye");

setTimeout(sayBye,1000);

sayHello();

In the above example from my understanding the sayHello() will execute first and at the meantime sayBye function is kept in the message queue until the current stack got emptied which is handled by event loop. So while execution of the sayHello(), If I put a break point inside sayHello()(in Chrome browser) at that time is there is any where in the browser tools or any window we can see and visualize that sayBye is kept in 'Message Queue'?

about 4 years ago · Juan Pablo Isaza
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