简体   繁体   English

使用自定义调试应用程序远程调试.NET CLR托管应用程序时,建议采取什么措施?

[英]What is recommended for remotely debugging a .NET CLR Managed Application with a custom debugging application?

When you install and use the Microsoft Remote Debugging tool (vsmon.exe), you are directed to then use Visual Studio to attach to the remote debugging tool for actual debugging. 在安装和使用Microsoft远程调试工具(vsmon.exe)时,系统将指示您使用Visual Studio附加到远程调试工具以进行实际调试。

I cannot find: 我找不到:

  • Any details of the protocol used between the remote debugger and Visual Studio 远程调试器和Visual Studio之间使用的协议的任何详细信息
  • Any source code for acting as the client to the remote debugger 任何充当远程调试器客户端的源代码
  • Any dll for interacting with the remote debugger as a third party application 用于与远程调试器作为第三方应用程序进行交互的任何dll

Is this not feasible? 这不可行吗? (Ie. My assessment above is mostly/all accurate) (即,我上面的评估大部分是/全部都是准确的)

Can any one think of a way to remotely debug a managed application which is running on the MS .NET CLR, without Visual Studio, but rather my own toolset (say in C#)? 谁能想到一种方法来远程调试在MS .NET CLR上运行的托管应用程序,而不使用Visual Studio,而是使用我自己的工具集(例如C#)?

Thanks. 谢谢。

(NOTES: (笔记:

  1. MDBG - Is a command-line tool with source code. MDBG-是带有源代码的命令行工具。 I believe this tool can only be used for debugging local managed processes only, and does not connect to the remote debugging tool. 我相信该工具只能用于调试本地托管进程,并且不能连接到远程调试工具。
  2. (There is also the Mono debugging stack, however my question relates to debugging .Net (runing managed code on .Net, not Mono)) (还有Mono调试堆栈,但是我的问题与调试.Net有关(在.Net上运行托管代码,而不是Mono))

)

I can confirm that the Debugging API underlying MDBG, does not support remote debugging directly. 我可以确认底层MDBG的调试API不直接支持远程调试。

The CLR debugging API does not support remote process debugging directly. CLR调试API不直接支持远程进程调试。 A debugger that is based on the CLR debugging API must still exist out-of-process from the debuggee. 基于CLR调试API的调试器必须仍然在调试对象的进程外存在。 Therefore, this solution requires a proxy process on the computer that has the debuggee. 因此,此解决方案要求在具有调试对象的计算机上执行代理过程。 http://msdn.microsoft.com/en-au/library/bb397953.aspx http://msdn.microsoft.com/en-au/library/bb397953.aspx

Note, however that a proxy process is nominated in this statement as a possible solution to that shortcoming. 但是请注意,此语句中指定了代理过程 ,以解决该缺点。

Remote Debugging can therefore be considered feasible levaraging the Debugging API, (check out the MDBG source code for reference on how to use the Debugging API), to expose a network API. 因此,可以认为远程调试可以通过使用调试API( 公开MDBG源代码以获取有关如何使用调试API的参考)来公开网络API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM