Work with the Node.js interactive window
Open the interactive window
You can open the interactive window by right-clicking the Node.js project node in Solution Explorer and selecting Open Node.js Interactive Window.
The default short-cut keys to open the Node.js interactive window are [CTRL] + K, N. Or, you can open the window from the toolbar by choosing View > Windows > Node.js Interactive Window.
Use the REPL
Once opened, you can enter commands.
.cls, .clear Clears the contents of the editor window, leaving the history and execution context intact.
.help Displays help on the specified command, or on all available commands and key bindings if none is specified.
.info Shows information about the current used Node.js executable.
Runs an npm command. If the solution contains more than one project, specify the target project using
.npm [projectname] <npm arguments>.
.reset Resets the execution environment to the initial state, keep history.
.save Saves the current REPL session to a file.