启动 Windbg 用户模式远程调试会话的最佳技术
您最喜欢启动 Windbg 用户模式远程调试会话的技术是什么? 为什么您比其他技术更喜欢这种技术? (优点/缺点)
使用windbg 进行用户模式远程调试至少有四种不同的方法,如Windows 帮助文件调试工具的“远程调试”部分中所述。
- 在目标上运行应用程序,然后从主机windbg附加到它
- 让主机windbg使用remote.exe在目标上启动应用程序
- 让“智能客户端”主机windbg通过运行在目标上的进程服务器在目标上启动应用程序目标
- 使用选项“-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.
- run app on target then attach to it from the host windbg
- have the host windbg use remote.exe to launch the app on the target
- have the "smart client" host windbg launch the app on the target via a process server that is running on the target
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
选项 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!
不存在“最好”的解决方案。 每种可能性都有优点和缺点,了解所有这些可能性是有好处的。 这取决于几个因素,例如:
在这 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:
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.
我倾向于使用选项 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".