从命令行运行 Visual Studio Profiler [英] Running the Visual Studio Profiler from the command line

查看:47
本文介绍了从命令行运行 Visual Studio Profiler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为自动分析系统的一部分,我想从命令行运行 Visual Studio 分析器.

As part of an automated profiling system, i want to run the visual studio profiler from the command line.

根据所有在线文档,我需要执行以下操作:

According to all of the online documentation, i need to execute the following:

VSPerfCmd \start:sample /output:test.vsp /launch:Test.exe

VSPerfCmd在我的系统路径下,Test.exe是用VS2019编译的HelloWorld C++程序,位于当前目录.我正在运行 32 位版本的探查器,而 Test.exe 是一个 32 位应用程序.我收到此错误:

VSPerfCmd is in my system path, and Test.exe is a HelloWorld C++ program compiled with VS2019 and located in the current directory. I am running the 32-bit version of the profiler and Test.exe is a 32-bit application. I get this error:

Error VSP1005: Command line error: Switch /launch:Test.exe is invalid. Aborting.

发现的其中一个指南提到了运行

One of the guides in found mentioned running

VSPerfCLREnv /sampleon

在采样模式下启动分析器之前.但是,我的 VSPerfCLREnv 命令版本无法识别此参数.使用 VSPerfCmd 的/Admin 参数安装并启动 Profiler 服务后,我无法以同样的方式启动内核驱动程序,但考虑到 Test.exe 只是一个 HelloWorld 程序,我认为我不需要它.

before starting the profiler in sampling mode. However my version of the VSPerfCLREnv command does not recognize this parameter. Using the /Admin parameter for VSPerfCmd i installed and started the Profiler service, i am unable to start the kernel driver in the same way, but considering Test.exe is just a HelloWorld program, i don't think i would need it.

有没有人在 VS2019 中使用过命令行分析器并且可以分享他们是如何工作的?

Has anyone used the command line profiler in VS2019 and can share how they made it work?

推荐答案

似乎 VSPerfCmd 在 Windows 8 或更高版本的采样模式下不再可用.相反,VSperf 用于采样,VSPerfCmd 用于跟踪.

It seems that VSPerfCmd is no longer useable in Sampling mode in Windows 8 or above. Instead VSperf is used for sampling and VSPerfCmd for tracing.

这篇关于从命令行运行 Visual Studio Profiler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆