zoukankan      html  css  js  c++  java
  • VS2008远程调试

      远程调试适用于目标机器没有开发环境且Bug无法在其他机器上重现的环境,是开发和测试中很实用的一种调试方法。下面简单介绍一下VS2008远程调试的方法。

    1. 将VS安装目录下Remote Debugger内x86文件夹(32位程序,64位程序拷x64文件夹)拷入目标机器待调试程序的文件夹。我的文件夹路径为C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86,如下图:
    2. 本地机器,VS2008工程属性->linker->debugging->Generate Debug Info选择yes,生成pdb文件。将生成的exe和pdb一起拷入目标机器。
    3. 目标机器,打开msvsmon.exe,设置Tools->Options->No Authentication(native only)->Allow any user to debug,点击确定。保存Server name。如图所示:
    4. 本地机器,工程属性->Debugging->Debugger to launch->Remote Windows Debugger。设置Remote Command为目标机器待调试程序的路径,Remote Server Name 为步骤4中保存的Server name。Connection为Remote with no authentication (Native only)。Debugger Type为Native Only。如下图所示:
    5. 本地机器,工具栏->Debug->Attach to Process。设置Transport为Remote(Native only with no authentication),Qualifier为目标主机的Server name。选择目标机器进程,开始调试。如下图所示:
  • 相关阅读:
    在 Queue 中 poll()和 remove()有什么区别?
    jdk 8 HashMap源码解读
    java 中,没有任何方法和成员变量的接口
    ArrayList、LinkedList、Vector、Array
    StringBuilder和StringBuffer
    Collection
    jdk代理和cglib代理源代码之我见
    多 线程
    Spring的@Enable*注解的工作原理
    redis 学习
  • 原文地址:https://www.cnblogs.com/hgwang/p/5804633.html
Copyright © 2011-2022 走看看