Visual Studio 2012 分析远程调试过程 [英] Visual studio 2012 profiling remotely debugged process

查看:48
本文介绍了Visual Studio 2012 分析远程调试过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以分析远程调试过程?

Is it possible to profile remotely debugged process?

我尝试使用来自关于使用 VS 2012 进行远程调试的文章

这无济于事,因为在启动探查器时,它会询问 dll 和 exe 调试的路径:即使您应用了远程调试设置(如文章中所述),这些路径也不会被视为远程计算机上的路径.

which don't help as, when launching profiler, it asks for paths to dll and exe debugged: these paths are not treated as paths on the remote machine even though you apply remote debugging settings(as in the article).

推荐答案

不幸的是,直接从 Visual Studio IDE 中这是不可能的(至少我的很多研究是这样理解的),目前唯一可能的方法是使用独立的分析器.

Unfortunately, that's not possible (at least as I understood by lot of research) directly from Visual Studio IDE and the only possible way for now is using stand-alone profiler.

注意:以下内容适用于 Visual Studio 2013,但可能是旧发行版的指南.

NOTE: the following applies to Visual Studio 2013, but might be a guideline for older distributions.

独立分析器让您可以直接从生产机器分析应用程序,而无需安装所有开发框架.

Stand-alone profiler let's you profile an application straight from production machine without the need to install all development framework.

这个独立的分析器随 Visual Studio 一起提供,可以找到它的安装文件.我在以下文件夹中找到了它:

This stand-alone profiler is shipped with Visual Studio and there can be found its setup file. I found it in the following folder:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\Setups\

我找到了两个文件:vs_profiler_x64_enu.exevs_profiler_x86_enu.exe.我选择了第一个,但取决于目标机器的架构.将此文件带到目标计算机并安装它.

I found two files: vs_profiler_x64_enu.exe and vs_profiler_x86_enu.exe. I picked the first one, but depends on the destination machine's architecture. Take this file to the destination machine and install it.

现在,在目标计算机上,您必须通过位于文件夹中的实用程序 VCPrefCmd.exe 启动要配置的应用程序:

Now, on the destination machine, you have to launch the application to profile by the utility VCPrefCmd.exe located in the folder:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools

通过命令行.所以你可以在环境中添加上面的路径或者直接输入以下内容:

through command line. So you can add the above path in the environment or just type the following:

"c:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\VSPerfCmd.exe" /start:sample /output:"c:\report.vsp" /launch:"c:\pathTo\appToProfile.exe"

哪里:

  • /start 是分析模式,在本例中为采样"
  • /output 要生成的报告的路径名
  • /launch 您的应用程序进行配置
  • /start is the profiling mode, "sampling" in this case
  • /output pathname of the report to produce
  • /launch your application to profile

现在您的应用程序将自动启动,您将完成所有工作.

now your application will start automatically and you'll do all your work.

完成后,关闭分析应用程序并在上一个命令行中键入以下命令:

Once you are done, close your profiling application and type the following command to the previous command line:

"c:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\VSPerfCmd.exe" /shutdown

这将停止分析并生成包含所有数据的 report.vsp(或您称之为的任何文件)文件.

and this will stop the profiling and produce your report.vsp (or whatever you called it) file with all the data.

现在将这个生成的文件带到您的开发机器并将其提供给您的 Visual Studio(打开或拖放),您将拥有您的应用程序配置文件.

Now take this produced file to your development machine and provide it to your Visual Studio (open or drag'n'drop) and you'll have your application profile.

虽然期待在 Visual Studio 中完成远程调试和分析"的嵌入,但此过程可能足够公平.

While looking forward to complete embedding of "Remote debugging and profiling" in Visual Studio, this procedure might be fair enough.

这篇关于Visual Studio 2012 分析远程调试过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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