Is there a way to execute JavaScript and display the results using Visual Studio Code?
For example, a script file containing:
consol
This may now be the easiest, as of v1.32:
{
"key": "ctrl+shift+t",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "node '${file}'\u000D" }
}
Use your own keybinding.
See Release notes: sendSequence and variables.
With vscode v1.32 you can sendSequence to the terminal using variables like ${file}, which is the current file. If you want some other path there, replace ${file} with your pathname in the keybinding above.
The \u000D is a return so it will run immediately.
I added 's around the ${file} variable in case your file path has spaces in it,
like c:Users\Some Directory\fileToRun