简体   繁体   English

轻量级独立C#调试器

[英]Light-weight Stand-Alone C# Debugger

I've been searching around the internet - and StackOverflow - for some recommendations on some lightweight .NET debuggers, but so far I haven't had a lot of luck. 我一直在互联网上搜索 - 和StackOverflow - 对一些轻量级.NET调试器的一些建议,但到目前为止我还没有很多运气。 Some articles/posts are either pretty dated, or otherwise don't exactly suit me needs. 有些文章/帖子要么过时,要么不完全符合我的需要。

What I'm specifically looking for is a very light-weight .NET debugger that I can wrap into my application, where I can create a "Debug mode" for administrators/developers. 我特别想要的是一个非常轻量级的.NET调试器,我可以将其包装到我的应用程序中,在那里我可以为管理员/开发人员创建一个“调试模式”。 Because this application is very specific to the data, and environment it runs in, and features some scripting as well, it would be really useful to allow users the ability to debug their scripts, and in some cases the underlying engine. 由于此应用程序非常特定于数据及其运行的环境,并且还具有一些脚本,因此允许用户调试其脚本(在某些情况下是底层引擎)非常有用。

In short, the requirements are: 简而言之,要求是:

  1. Lightweight, 重量轻,
  2. Allows users to set up custom breakpoints, 允许用户设置自定义断点,
  3. And finally, allows users to step-through code 最后,允许用户单步执行代码

I could use the standard Visual Studio debugger, and use Debugger.Break() , but ultimately, this fails requirement number 1 of it being lightweight - I need something I can wrap into my application. 我可以使用标准的Visual Studio调试器,并使用Debugger.Break() ,但最终,这要求它的第1号要求是轻量级的 - 我需要能够包装到我的应用程序中的东西。

CLR托管调试器(mdbg)示例应该可以帮助您入门。

What about using the CSharpCodeProvider class? 那么使用CSharpCodeProvider类呢? This will at least provide compiling, and I believe will provide debugging info. 这至少会提供编译,我相信会提供调试信息。 Although I'm not sure of the detail. 虽然我不确定细节。 Maybe between the CLR mdbg as @Eric recommends and the CodeProvider, you will get what you want. 也许在@Eric推荐的CLR mdbg和CodeProvider之间,你会得到你想要的。

You should be able to compile stand-alone scripts and debug. 您应该能够编译独立脚本和调试。 Although, it would be impossible to debug the application itself, while it is running - a point I certainly missed while @Hans is sharp enough to point out in his comment. 虽然,在它正在运行时调试应用程序本身是不可能的 - 我肯定错过了一点,而@Hans在他的评论中足够尖锐地指出。

.NET Framework 2.0软件开发工具包包含您想要的内容

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

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