1

I'm using Node.js in VScode. Say my run command is node index.js. As I run command various console.log statements print during course now I want to clear console log without stopping current node process. In existing case To clear the console I have to stop the running process using Ctrl+c. use clear command in terminal to clear screen and again run the process using node index.js. My question is there any method by using which i can clear terminal window without stopping current node process.

Aamer Rasheed
  • 115
  • 3
  • 14

1 Answers1

0

You can use console.clear() function in your node program. If you want to clear vscode terminal window, just click by right mouse on terminal and select Clear (shortcut Ctrl + K)

hoangdv
  • 15,138
  • 4
  • 27
  • 48
  • Question still remains. Need information of command or shorcut for running linux terminal witout stoping a running node instance. Besides using console.clear() in node program clears console during execution at certain point and my question was to clear terminal at any time as per my disposal. – Aamer Rasheed Nov 21 '18 at 15:22