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

186
Visualizações
How to print the cause for a thrown Error in Chrome console?

Since July 2021 they have added a new error cause property in Javascript, so we are able to do:

throw new Error('New error message', { cause: err });

In Firefox this err object is shown after the original error. On Chrome only the original error is shown, and I can't store the thrown error into variable to inspect it. How do I see the error cause then? (Without modifying the source code / get into the debugger)

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

0

I don’t think there's a way unless you catch the error before it's being thrown with the "Pause debugger on uncaught errors".

We'll have to wait until Chrome natively includes the cause’s stack trace in when displaying the error, just like Firefox and Node do. This is being tracked here:

https://bugs.chromium.org/p/chromium/issues/detail?id=1211260

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