vscode-js-debug icon indicating copy to clipboard operation
vscode-js-debug copied to clipboard

Clear Debug Console on refresh

Open cosminalco opened this issue 6 years ago • 4 comments

I would like the Debug Console to be cleared at each refresh, similar to how Google Chrome clears the console by default when you refresh. Is there a way to do this?

cosminalco avatar Apr 27 '19 11:04 cosminalco

Not currently. In Chrome devtools, there is a way to disable this on the fly, and I wouldn't want to add this without a button to disable it. It's not likely that vscode would add a button for this. How about writing a message to the debug console when the page is refreshed?

roblourens avatar Apr 27 '19 19:04 roblourens

+1 on having clear console on refresh be a default option.

Here is a temporary work-around that I've added to my code (requires jQuery):

$(window).on("unload", () => {
  console.clear();
});

see https://stackoverflow.com/questions/9308336/execute-function-before-refresh for other options

matthewjosephtaylor avatar Dec 28 '20 22:12 matthewjosephtaylor

When I am debugging in VS code for my angular app, I use console.clear()

AnthonyCalderaio avatar Nov 12 '21 14:11 AnthonyCalderaio

When I am debugging in VS code for my angular app, I use console.clear()

simple and easy to use ...tq

kadiri2006 avatar Mar 19 '22 13:03 kadiri2006