Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
Debugging js files with VS Code

I'm new to javascript.

I'm trying to debug the simple program:

console.log("Hello World!\n"); // this line has a breakpoint

let million = 1_000_000;
console.log(million);

However, when I press the play button in the debug section, I get:

Process exited with code 1
Uncaught SyntaxError SyntaxError: Invalid or unexpected token
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Most likely node.js hasn't implemented the "_" notation for numbers. Despite that, the error message I'm seeing seems more like messages from a bad build from C++ (we even get a code error 1), than a bad script in a higher level.

Is there a way to make this output more like a higher level language, like python, where with the traceback would point us to the file and line of the error? Also, why is it that the debugger is not stopping at the breakpoint?

P.S.: When a press the dropdown arrow in the debug terminal, I get the message No debugger available, can not send 'variables'.

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Well, to solve this issue, I had to create a launch.json file (not sure how), and then I added "console": "integratedTerminal" to it.

So, when we launch the program, in the integrated vscode terminal we'll get the error message with some extra information:

let million = 1_000_000;
              ^

After solving this error, the debug will work almost as expected, except for the behaviour of the step-into button.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda