Visual Studio 2022 doesn’t show errors when launching a javascript program

I’m new to using Visual Studio IDE (not Visual Studio Code) for learning javascript. The problem is that it doesn’t report any obvious errors, it just immediately close black window that pops up when launching program:

'use strict';

let variable = "some_text";hdghg                                   // obvious syntax error
console.log(variable);


var readline = require('readline');                                // these two lines are used to
var rl = readline.createInterface(process.stdin, process.stdout);  // keep black window opened

Read more here: Source link