You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Notice I changed "Clear Channel" to run channel.dispose)
exportconstactivate=(context: vscode.ExtensionContext)=>{lettimer,counter=1;letchannel=vscode.window.createOutputChannel('Test Channel');vscode.commands.registerCommand('testExtension.clearChannel',()=>channel.dispose());vscode.commands.registerCommand('testExtension.showChannel',()=>channel.show());vscode.commands.registerCommand('testExtension.hideChannel',()=>channel.hide());vscode.commands.registerCommand('testExtension.startAppending',()=>{if(!timer){timer=setInterval(()=>{if(counter%2===0){channel.appendLine(`${counter++} // Cancellation that controls whether or not we can cancel in the middle of type checking. In general cancelling is *not* safe for the type checker. We might be in the middle of computing something, and we will leave our internals in an inconsistent state. Callers who set the cancellation token should catch if a cancellation exception occurs, and should throw away and create a new TypeChecker.`)}else{counter++;channel.append(`Test\n`)}},1000);}});};
When I dispose the channel, it's gone from the UI. However, if one still has a reference to it, after using appendLine the channel comes back.
My suggestion is to error out for such cases.
The text was updated successfully, but these errors were encountered:
Testing #40716
I have this setup:
(Notice I changed "Clear Channel" to run
channel.dispose
)When I dispose the channel, it's gone from the UI. However, if one still has a reference to it, after using
appendLine
the channel comes back.My suggestion is to error out for such cases.
The text was updated successfully, but these errors were encountered: