-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not show complete content after reload if output is cleared #204946
Comments
It is designed that logs are retained on window reload |
I understand persisting the logs between window reloads, but why persist them after having explicitly cleared them? This certainly feels counterintuitive. |
Good point. |
Should this be reopened? |
As discussed in #232500, the behavior with regards to the log file written to disk is also different on WSL compared to MacOS:
const logger = vscode.window.createOutputChannel("My extension", { log: true });
|
Type: Bug
I'm building an extension that uses the LogOutputChannel to output some logs when the extension activates.
I started noticing that everytime I reloaded the window, I'd end up with the same logs twice: the logs from the previous activation, and the logs from the current activation.
I assumed that the channel wasn't cleared automatically so at first I manually cleared the output channel using the context menu action before reloading the window. Unfortunately, this still results in the logs from the previous activation being shown. Programmatically clearing the output channel using the
clear
method did not work either.The only way I could the channel to clear was to completely restart VS Code.
I'm thinking maybe the buffer is not being cleared and when the window is reloaded, the logs from the current activation are appended to the logs from the previous one.
VS Code version: Code 1.86.1 (31c37ee, 2024-02-07T09:09:01.236Z)
OS version: Darwin x64 23.2.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Screen.Recording.2024-02-11.at.18.51.26.mov
The text was updated successfully, but these errors were encountered: