You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Visual Studio 2019无法启动Concurrency Visualizer问题求助

解决VS2019 Concurrency Visualizer无法启动ETW收集(NT Kernel Session启动失败)

问题详情

  • 在Visual Studio 2019中启动Concurrency Visualizer时,报错:Unable to start the ETW collection
  • 通过命令行执行CVCollectionCmd.exe /Launch exe_path时,错误信息为:

    A fatal error happened while running the application: Failed to start the "NT Kernel Session"
    附带堆栈跟踪:

    Exception 'System.ServiceModel.FaultException`1[Microsoft.ConcurrencyVisualizer.Common.CollectionFault]', trace:
    Server stack trace:
       в System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       в System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       в System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]:
       в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       в Microsoft.ConcurrencyVisualizer.Common.ICollectionService.StartTracing(TraceProviders providers, String tracingDir, String traceFileNamePrefix, EtwBufferSettings kernelBufferSettings, EtwBufferSettings userBufferSettings)
       в Microsoft.ConcurrencyVisualizer.CommandLine.CollectionServiceManager.StartCollectionForTarget(LocalConfig config, TargetBase target)
       в Microsoft.ConcurrencyVisualizer.CommandLine.LaunchCommand.Execute(CollectionCmdReader reader)
       в Microsoft.ConcurrencyVisualizer.CommandLine.CollectionCmdApp.Main(String[] args)
    
  • 执行CVCollectionCmd.exe /Query时,返回:未在收集,准备启动。

解决方法

1. 以管理员权限运行

Concurrency Visualizer需要管理员权限才能启动ETW内核会话:

  • 右键Visual Studio图标,选择「以管理员身份运行」
  • 或打开管理员命令提示符执行CVCollectionCmd.exe相关命令

2. 检查并重启ETW相关服务

  1. 打开服务管理器(执行services.msc)
  2. 确保EventLog服务处于运行状态,未运行则启动
  3. 确保Windows Event Collector服务处于运行状态,必要时重启该服务

3. 重置ETW会话缓存

  1. 打开管理员命令提示符,执行命令停止所有ETW会话:
    logman stop -ets *
    
  2. 删除残留的会话日志文件(注意:此操作会清除系统事件日志,确认无需保留后执行):
    del /q C:\Windows\System32\winevt\Logs\*
    

4. 修复Visual Studio安装

  1. 打开Visual Studio Installer,选中VS2019实例
  2. 点击「修改」→「修复」,等待修复完成后重启VS

5. 添加用户到Performance Log Users组

  1. 右键「此电脑」→「管理」,打开计算机管理
  2. 依次展开「本地用户和组」→「组」
  3. 找到Performance Log Users组,添加当前用户到组内,重启电脑后生效

内容的提问来源于stack exchange,提问作者Alexey Subbota

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 12:10:49