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

268
Visualizações
VSCode and Stencil (tsx): `debugger` statement doesn't put browser into debug mode

I'm very new to debugging JavaScript, let alone Typescript, let alone a Stencil project that uses tsx files (which I assume are a certain type of reactive Typescript files).

I hoped that by adding a debugger statement into the code, using a refresh in Chrome the Debugging tools would show up. But nothing happens. If I add a console.log at the same place, it behaves as expected. But nothing happens with a debugger statement.

What to do? I don't want to debug with tons of console.log everywhere. 😏

I'm using VSCode by the way. Don't know whether that is relevant. I read in https://github.com/microsoft/vscode-js-debug that JavaScript debugging should be built into VSCode. I don't care whether I debug inside VSCode or inside Chrome - as long as I am able to debug somehow.

Here is the repository, if somebody wants to give it a try or checkout configuration files: https://github.com/NothingAG/adg-components

Thanks a lot.

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

0

Instead of adding debugger statements in code you can always add breakpoints in Chrome Developer Tools.

  1. Load your app in the browser
  2. Open Developer Tools in Chrome (for example right-click on a page and choose "Inspect")
  3. In Developer Tools choose tab "Sources"
  4. Open the file you want to debug by hitting command-P. An input field appears where you can enter the name of the file you want to debug
  5. Add a breakpoint by clicking on the line number in the gutter

Next time your app hits the breakpoint the debugger shows up.

about 4 years ago · Juan Pablo Isaza Relatório

0

Apparently the build tool (nx) runs a production build which is why debugger statements are automatically filtered out.

To fix it you can explicitly instruct Stencil to run a development build:

npm start -- --dev
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