I am running a JavaScript program (Node.js) from VS Code with Ctrl+F5 or F5 (Run Without Debugging or Start Debugging), and execution stops because of an error in my code. The DEBUG CONSOLE of VS Code shows me the error and the name of the affected source file, but not the line number where the error occurred in the source file. It says instead No debugger available, can not send 'variables'.
E.g. see the error at line 7 of the program in the screenshot.
How can I get VS Code to show me the line number where an error has occurred, after running the program from the Run menu?
I noticed that I can have it if I run my program from the VS Code TERMINAL instead. See this screenshot.