如何使用Debector?

发布于 2024-07-12 00:25:29 字数 580 浏览 14 评论 0原文

我正在使用第三方框架,代码非常糟糕,而且我遇到了我无法弄清楚的异常。 我能够使用 .NET Reflector 进行反编译,现在我尝试使用进行调试Deblector,但我什至不知道如何设置断点。 为什么这个工具没有文档?

没有任何关于如何使用它的信息。 内置帮助只是给出了一个命令列表,我理解得很好,因为它们是标准的调试器命令......但我不知道如何让它工作,所以我可以单步执行代码,我需要也检查变量。

我已经在谷歌上搜索了很长时间,我所能找到的只是博客说这个工具有多棒。 嗯,我确信如果我能让它发挥作用那就太酷了。 文档在哪里,或者如何设置断点?

我可以将其附加到我的进程中,但我无法暂停或执行任何操作,并且即使我已激活该选项,异常发生时它也不会中断。

说真的......我们应该做一些文档 - 我会将它们发布到谷歌可以到达的地方。

I am working with a third-party framework, and the code is pretty bad, and I'm getting exceptions that I can't figure out. I was able to decompile using .NET Reflector, and now I'm trying to debug using Deblector, but I can't even figure out how to get a breakpoint set. Why is there no documentation for this tool?

There is nothing available about how to use it. The built-in help simply gives a list of commands, which I understand just fine, as they are the standard debugger commands... but I can't figure out how to get it working so I can step through code and I need to examine variables too.

I have been googling for a long time and all I can find is blogs saying how wonderful this tool is. Well, I'm sure it would be pretty cool if I could make it work. Where is the documentation, or how do I set a breakpoint?

I can get it to attach to my process, but I can't pause or anything, and it doesn't break when the exception happens, even though I have activated that option.

Seriously... we should do some documentation - I will post them somewhere that Google can reach.

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

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

发布评论

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

评论(2

纵性 2024-07-19 00:25:30

也许这会对您有所帮助:

首先,我使用来自 http://www.codeplex.com/deblector

在此版本中,通过以下过程非常简单:

  • 附加到进程

    • 在命令行中使用 a[ttach] 命令:a
    • 使用工具栏(带有齿轮的窗口)中的附加按钮。
  • 如果附加成功(您在控制台中看到这一点,使用工具 -> Deblector 激活),则应加载所有引用的程序集。

  • 设置断点(您必须停止程序才能设置断点):

    • 使用b[reak]命令:例如b- 还有更多选项可以使用help b > 为此。
    • 更简单:使用“Break”按钮(或 F9)并在 Deblector 中选择一行IL 视图。

其他使用说明:

Debector 命令行:
如果您当前附加到一个进程并正在运行,则命令行将不会响应,您必须先停止,否则它将无法正确响应。

对于 64 位平台:
该应用程序必须设置为作为 32 位应用程序运行,否则无法附加。

在 Visual Studio 中: 项目 -> 属性-> 构建平台目标:x86

使用 corflags 工具:这应该与 Visual Studio 一起安装(使用 Visual Studio 命令提示符)。

 To set 32-bit mode: corflags <ProgramName> /32BIT+ 
 To unset it:        corflags <ProgramName> /32BIT-

查找进程 ID 并检查程序是否在 32 位或 64 位模式下运行
Process Explorer 对此非常有帮助。

Maybe this will help you:

First of all, I am using the DeblectorAddin-1.01-Alpha from (I don't know if it works like this in older versions too) from http://www.codeplex.com/deblector.

With this version, it is quite simple with the following procedure:

  • Attach to a process

    • With the a[ttach] command in the command line: a <pid> .
    • Using the attach button in the toolbar (window with a gear in it).
  • If the attach was a success (you see this in the console, activated with Tools->Deblector) all referenced assemblies should be loaded.

  • Setting a break point (you must have halted the program to set a break point):

    • Using the b[reak] command: e.g. b <Namespace.Class.Function> - there are more options available use help b for that.
    • Much simpler: Use the Break button (or F9) and select a row in the Deblector IL view.

Additional usage notes:

Deblector Commandline:
The command line will not respond if you are currently attached to a process and running, you must halt first or it will not respond properly.

For 64-bit platforms:
The application must be set to run as 32-bit application or it can't be attached to.

In Visual Studio: Project -> Properties -> Build Platform target: x86

With the corflags tool: This should be installed with Visual Studio (use the Visual Studio command prompt).

 To set 32-bit mode: corflags <ProgramName> /32BIT+ 
 To unset it:        corflags <ProgramName> /32BIT-

To find the process ID and check if a program runs in 32 or 64-bit mode:
Process Explorer is very helpful for that.

浮萍、无处依 2024-07-19 00:25:30

现在有了 Reflector Pro,它就能做到这一点。 它将托管程序集反编译为 C# 或 VB.NET,并创建必要的 PDB。 然后,您可以设置断点并单步进入您喜欢的任何托管程序集。

http://www.red-gate.com/products/reflector/walkthrough。嗯

There's Reflector Pro now, which does just that. It decompiles managed assemblies to C# or VB.NET, and creates the necessary PDBs. Then you can set breakpoints and step-into into any managed assembly you like.

http://www.red-gate.com/products/reflector/walkthrough.htm

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