title: How to automatically run a Node.js program using VSCode?
body: <p>I was wondering whether there is a way to execute a Node.js program using some keyboard shortcut in Visual Studio Code.</p>
  <p>For instance, while I am coding in the editor, instead of having to manually open the Integrated Terminal in Visual Studio Code and then type let's say <code>node app.js</code>, can I just configure a key to automatically do this?</p>
  <p>Below shown is an illustration of what I want:</p>
  <p><a href="https://i.stack.imgur.com/1jbRT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1jbRT.png" alt="enter image description here" /></a></p>
  <p>I want to run the file <code>app.js</code> in the terminal without having to go there again and again and type <code>node app</code> (or even by using the up arrow key to bring the last entry from the terminal's history).</p>
  <p>Note: I found one way of doing so and that is to go to the <strong>Debug console</strong>. But sometimes, it doesn't display full results. For instance, when logging a module, it displays one line with a caret which can be used to inspect details of the logged object further, but when I press the caret, it says that <em>there is no debugger to view the object</em>.</p>