启动 Windbg 用户模式远程调试会话的最佳技术

发布于 2024-07-04 04:39:16 字数 347 浏览 9 评论 0原文

您最喜欢启动 Windbg 用户模式远程调试会话的技术是什么? 为什么您比其他技术更喜欢这种技术? (优点/缺点)

使用windbg 进行用户模式远程调试至少有四种不同的方法,如Windows 帮助文件调试工具的“远程调试”部分中所述。

  1. 在目标上运行应用程序,然后从主机windbg附加到它
  2. 让主机windbg使用remote.exe在目标上启动应用程序
  3. 让“智能客户端”主机windbg通过运行在目标上的进程服务器在目标上启动应用程序目标
  4. 使用选项“-server”在目标机器上运行一个windbg实例来自动启动服务器,然后从第二台机器连接到该服务器。

What is your favorite technique for launching a windbg user-mode remote debugging session?
Why is do you prefer this technique over other techniques? (pros/cons)

There are at least four different ways to do user-mode remote debug using windbg, as documented in the "Remote Debugging" section of the debugging tools for windows help file.

  1. run app on target then attach to it from the host windbg
  2. have the host windbg use remote.exe to launch the app on the target
  3. have the "smart client" host windbg launch the app on the target via a process server that is running on the target
  4. run a windbg instance on the target machine using the option "-server" to automatically start a server, then connect to the server from a 2nd machine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

余生共白头 2024-07-11 04:39:16

选项 1 是我最喜欢的,因为它是最简单的。 我可以以正常方式启动应用程序,而不必担心让 WinDbg 设置正确的工作目录、传递任何命令行参数等。

幸运的是,我还没有遇到任何不起作用的情况!

Option 1 is my favourite because it is the simplest. I get to launch the app in the normal way without worry about getting WinDbg to set the right working directory, pass any command line arguments, etc.

Fortunately I've not run into any cases where this hasn't worked!

打小就很酷 2024-07-11 04:39:16

不存在“最好”的解决方案。 每种可能性都有优点和缺点,了解所有这些可能性是有好处的。 这取决于几个因素,例如:

  • 符号位于哪里
  • 哪台 PC 可以访问 Internet 以下载操作系统符号
  • 您可以将多少数据复制到服务器(如果只是单个 Exe,客户端通常会更好地接受)
  • 之间的带宽是多少客户端和服务器
  • 是否需要 CDB/WinDbg 之外的其他命令,例如访问 CMD,然后考虑
  • 在服务器端可用的 Remote.exe、可以轻松告诉其许多神秘命令的调试专家或几乎不知道的普通用户知道如何启动命令提示符
  • 双方都在专用网络中,因此您需要一个“中间人”服务器才能相互访问(或使用端口转发作为替代方案,IT人员不希望这样做,而且它可能需要几天时间才能完成设置)

在这 4 个选项中,不要忘记客户通常希望准确了解您所做的事情,因此他们需要 RDP 会话、Teamviewer 或类似工具。 这是他们所理解的。

There is no "the best" solution. Each of the possibilities has advantages and disadvantages and it's good to understand all of them. It depends on several factors like:

  • where are the symbols located
  • which PC has access to the Internet to download the OS symbols
  • what amount of data may you copy to the server (clients often accept better if it's just a single Exe)
  • what's the bandwidth between client and server
  • do you need other commands that just CDB/WinDbg, e.g. access to CMD, then consider remote.exe
  • who's available on the server side, a debugging expert whom you can easily tell a lot of cryptic commands or a normal user who barely knows how to start a command prompt
  • are both sides in a private network, so you need a "man in the middle" server to be able to access each other (or port forwarding as an alternative, which IT guys don't want and it may take days to get it set up)

From those 4 options, don't forget that clients often want to see exactly what you do, so they require an RDP session, Teamviewer or similar. That's something they understand.

梦在深巷 2024-07-11 04:39:16

我倾向于使用选项 4 (-server),因为它是唯一一个在您闯入内核调试器足够长的时间以使 TCP 连接超时时不会“弹出”的选项。 但这更复杂并且不能完全令人满意。 所以我正在寻找“最佳实践”。

I tend to use option 4 (-server) because it is the only one that doesn't "pop" when you break into the kernel debugger long enough for the TCP connection to timeout. But this is more complex and not fully satisfying. So I'm looking for "best practices".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文