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

205
Visualizações
Breakpoint not hit after upgrade of VS Code (after 1.57.1) when running mocha

I'm developing a API REST in JAVASCRIPT using KOA, and to test my routes I write integrated test launched with MOCHA.

I'm using VS Code for MAC

When debugging my test files I run my launch.js configuration

{
          "type": "node",
          "request": "launch",
          "name": "Mocha Current File",
          "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
          "args": [
              "--timeout",
              "999999",
              "--colors",
              "${file}"
          ],
          "env": {
          "NODE_ENV":"test",
          },
          "console": "internalConsole",
          "outputCapture": "std"
      },

which return this command in the terminal

/Users/ME/.nvm/versions/node/v16.6.0/bin/node ./node_modules/mocha/bin/_mocha --timeout 999999 --colors /Users/ME/MyProject/test/integration/test-to-check.test.js

And before the VS Code update (when using 1.57.1) all my breakpoint would have been hit without any problems every time I run my test, but after this version and without changing anything, my breakpoint wasn't hit anymore.

all version after 1.57.1 to 1.60.2

Then currently I need to lock my version of VS Code to 1.57.1 If I want to debug my test.

Here is the weird thing about this case :

  • none of my coworkers have this problems using the same projet, launch.js and VS Code version
  • If I run my other configuration which run all the test, sometime this launch configuration will work
  • The first run after launching VS Code will hit the breakpoint

I already tried to read/use the official documentation of VS Code about the new debugger process, but it didn't change anything.

After searching for every thread speaking about the subject, I'm short of idea

If someone have a solution on this case, it would be a great help.

Thank in advance !

Libraries version :

  • mocha : 9.0.3
  • node : 16.6.0 (work with all version after 12.6.3)
  • koa : 2.13.1
  • vs-code : 1.60.2
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