[英]Debug code on machine without installing Visual Studio
I have one test machine that my program needs to run on that machine. 我有一台测试计算机,我的程序需要在该计算机上运行。 It fails to run but I don't know the reason. 它无法运行,但我不知道原因。
I want to debug the code on that machine to check the issue without installing Visual Studio 2012 on that machine. 我想在该计算机上调试代码以检查问题,而不在该计算机上安装Visual Studio 2012。 I have the source code of the program. 我有程序的源代码。 What should I do? 我该怎么办?
Thanks. 谢谢。
You will need to use the remote debugging tools, go to your start menu, find your visual studio and expand it, find Visual Studio Tools and then remote debugging folder. 您将需要使用远程调试工具,转到“开始”菜单,找到Visual Studio并将其展开,找到Visual Studio Tools,然后找到远程调试文件夹。
When you have this copy the x86 or x64 folder over to the machine you want to debug on and run the application or web page and msvsmon.exe. 将x86或x64文件夹复制到要调试的计算机上,然后运行应用程序或网页和msvsmon.exe。
Then on your machine from the debugging menu attach to process, and then target the machine that you want to run against. 然后从调试菜单上的计算机上附加到进程,然后将您要运行的计算机作为目标。
Then look for the process you want to debug 然后寻找您要调试的过程
You can use remote debugging and debug the remote code on your machine as you have the source code. 您可以使用远程调试,并在拥有源代码的情况下在计算机上调试远程代码。 You can also write exception logs in remote application to know what error has occurred at what place in your code. 您还可以在远程应用程序中编写异常日志,以了解在代码中的什么位置发生了什么错误。 For remote debugging the see the detailed explanation about remote debugging as under from MSDN article. 有关远程调试,请参见MSDN文章中有关远程调试的详细说明。
How to: Enable Remote Debugging 如何:启用远程调试
Visual Studio provides support for remote debugging, that is, the ability to debug an .exe on another computer connected to your network. Visual Studio提供了对远程调试的支持,即可以在连接到网络的另一台计算机上调试.exe的功能。 The Use remote machine property on the Debug page of the Project Designer enables remote debugging of an .exe. 项目设计器的“调试”页面上的“使用远程计算机”属性启用.exe的远程调试。 When this option is selected, you must specify the name of the machine on which the .exe will run. 选择此选项时,必须指定将在其上运行.exe的计算机的名称。 The location of the .exe on the remote machine must match the value of the Make exe path property, which is on the Compile page of the Project Designer. .exe在远程计算机上的位置必须与Make exe路径属性的值匹配,该属性位于Project Designer的“编译”页面上。 In order to debug on a remote machine, the following conditions must be met: 为了在远程计算机上进行调试,必须满足以下条件:
To enable remote debugging 启用远程调试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.