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

223
Visualizações
Javascript console.log not working inside function in debugger

To debug some concepts I run this in Chrome Console:

what = function(){ 
    let value = 5
    try { 
        wrong(); 
    } catch(e) { 
        console.log('bad'); 
        value += 1
    }
    return value
}
what()
# returns 6

Works as expected, except console.log('bad') never happens.

obviously the fact that value = 6 and not 5 is proof that block is called.

Why does console.log just get skipped in the console? I'm pretty sure I've injected JS into apps where the console.log works so this is probably a setting in the console window itself. Firefox's behavior is the same.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

My best guess, since it isn't working on either platform, is that it is an extension that is blocking it -- from another stackoverflow post, it may be firebug lite or you accidentally disabled it through your filters.

If none of this works, I suggest trying out a guest window and seeing if it works there.

I can not reproduce this on my own machine as well as others: Chrome 102.0.5005.61 (Official Build) (64-bit) (cohort: 102_win_control)

about 4 years ago · Juan Pablo Isaza Relatório

0

It is working! Remove the last line and it will work! If it again did not worked then it is might blocking by an extension

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