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.
Asked
Active
Viewed 113 times
1
-
You need to restart the Node process anyway before your changes take effect. – robertklep Nov 20 '18 at 12:31
-
What if I want to clear various log statement of running console without restarting node process. – Aamer Rasheed Nov 20 '18 at 12:46
1 Answers
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