ActiveState 日志文件在 VS 代码中激增

问题描述

每当我运行 VS Code 时,我的目录中都会填满许多带有错误消息的文件名称类似于“state-99999.log”,内容如下。我不知道这些文件来自哪里(我不使用activeState) 以及如何摆脱它们:

[ERROR Jun  4 14:42:19.225202200,defaults.go:149] Could not load configuration: Failed to load configuration.

Stacktrace: D:/a/cli/cli/internal/logging/logging.go:github.com/ActiveState/cli/internal/logging.Error:258
D:/a/cli/cli/internal/logging/defaults.go:github.com/ActiveState/cli/internal/logging.init.0:149
C:/hostedtoolcache/windows/go/1.15.11/x64/src/runtime/proc.go:runtime.doInit:5652
C:/hostedtoolcache/windows/go/1.15.11/x64/src/runtime/proc.go:runtime.doInit:5647
C:/hostedtoolcache/windows/go/1.15.11/x64/src/runtime/proc.go:runtime.doInit:5647
C:/hostedtoolcache/windows/go/1.15.11/x64/src/runtime/proc.go:runtime.main:191
C:/hostedtoolcache/windows/go/1.15.11/x64/src/runtime/asm_amd64.s:runtime.goexit:1374

[DEBUG Jun  4 14:42:19.227203700,defaults.go:178] Args: [C:\Users\myuser\AppData\Roaming\ActiveState\bin\state.exe show --output editor]
[DEBUG Jun  4 14:42:19.229204500,locale.go:34] Init

解决方法

VS Code 的 ActiveState 扩展是问题的根源。在 VS Code 中卸载扩展可以防止它生成令人讨厌的日志文件。