I’m writing a vscode extension. I want to temporarily override the console.log behavior
so I did this :
this.old = console.log;
console.log = this.write.bind(this);
(‘write’ is a method of a class in my extensions, which does something else. I kept the real console.log in an ‘old’ variable to set it back to normal shortly afterward.)
Problem is that this does not seem to actually reassign the “log” method of the console. Calling console.log still keeps its original behavior.
Is the console object instance protected in extensionHosts process of vscode or something?