用于调试远程机器问题的技术和工具? [英] Techniques and tools for debugging problems on remote machines?

查看:162
本文介绍了用于调试远程机器问题的技术和工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户一直在报告我的机器无法复制的问题/崩溃/错误。我发现这些问题难以解决。

Users have been reporting problems/crashes/bugs that I can't reproduce on my machine. I'm finding these problems difficult to fix.

我已经开始使用EurekaLog(太棒了!)和SmartInspect。这两个这些工具都有很大的帮助,但是我仍然很难发现一些问题。

I've started using EurekaLog (fantastic!) and SmartInspect. Both these tools have helped greatly but I'm still finding it difficult to catch some problems.

我刚刚购买了由David Agans调试(并等待它到达)。

I've just purchased Debugging by David Agans (and waiting for it to arrive).

有没有Delphi特有的任何其他工具或技术,有助于捕捉这些难以找到的远程问题?我发现难以追溯的问题是那些不引起例外或明确原因的问题。 EurekaLog捕获异常,一旦我有理论检查,SmartInspect就会很好。但在某些情况下,这是一个看似随机的崩溃,有几千行代码可能是错误的。如何缩小到根本原因?

Are there any other tools or techniques specific to Delphi that will help with catching these hard to find remote problems? The kinds of problems I'm finding difficult to track down are those that don't raise exceptions or have a clear cause. EurekaLog catches exceptions and SmartInspect is pretty good once I have a theory to check. But in some cases it is a seemingly random crash and there are several thousand lines of code that may may be at fault. How to narrow down to the root cause?

推荐答案

MadExcept 是我使用的,这是非常棒的。我还使用了EurekaLog,发现功能几乎完全相同,除了我有更多的经验和时间使用MadExcept。它是免费的非商业用途,价格合理的商业用途。
更新: MadExcept 4现在出来,甚至支持64位Delphi XE2应用程序,并且还有内存泄漏检查。

MadExcept is what I use, and it is fabulous. I have also used EurekaLog and find the functionality almost exactly identical, except that I have more experience and time using MadExcept. it's free for non-commercial use, and reasonably priced for commercial use. Update: MadExcept 4 is now out and even supports 64 bit Delphi XE2 apps, and has memory-leak checking too.

当没有什么爆发的时候,我依靠大量使用痕迹记录。我有一个TraceMessage(整数,字符串)函数,我在所有的应用程序中调用,当有人有问题时,让他们点击一个菜单项,将调试跟踪级别调到最详细的级别;它给了我一个完整的应用程序的历史记录,这有助于我超越madExcept来解决客户站点的问题。客户发生故障,madexcept发送的崩溃报告包含自动附加的日志文件(由我的应用程序创建)。我相信你可以和madExcept和EurekaLog一样好。如果您需要一个日志记录系统,您可以下载Log4D,或者您可以自己编写,这很简单。

When nothing blows up, I rely on heavy use of trace logging. I have a TraceMessage(integer,string) function which I call throughout all my apps, and when someone has problems I get them to click a menu item that turns up the debug trace level to the most verbose level; it gives me a complete history of everything my application did, and this has helped me even more than madExcept, to solve problems at customer sites. Customers get a crash, and that crash report sent by madexcept contains a log file (created by my app) that is attached automatically. I believe you can do this equally well with madExcept and EurekaLog. If you need a logging system you could download Log4D, or you could write your own, it's pretty simple.

为了永远免费,尝试JclDebug,这需要更多的工作

For always-free, try JclDebug, which requires more work to set up, but which has worked fabulously for me, also.

有关堆问题的帮助,请了解有关fastMM(完整版)调试选项的更多信息。

For help with heap problems, learn more about fastMM (full version) debug options.

不要忘了,Delphi本身支持远程调试,如果您可以在办公室的机器上重新安装没有安装delphi的崩溃,请在办公室网络中使用远程调试在您工作的其他机器上安装完整的RAD Studio安装。您也可以使用远程调试来连接到互联网上的客户端PC计算机,但是我还没有在互联网上尝试远程调试,所以我不能说它是否在互联网上运行良好。我知道,由于远程调试不支持您自己构建的EXE文件的自动部署(您必须自己做这个部分),通过互联网远程调试到客户端PC是更多的工作。

And you shouldn't forget that Delphi itself supports Remote debugging, if you can reproduce a crash on machines in your office that don't have delphi installed, use remote debug across the office network instead of installing a complete RAD Studio installation on that other machine at your work. You could also use remote debug to connect to a client PC computer across the internet, but I have not tried remote debug across the internet yet, so I can't say whether it works great over the internet or not. I do know that since remote debug doesn't support automatic deploy of the EXE file you built (you have to do that part yourself), remote debug over internet, to a client PC is more work.

您还可以通过修复所有提示和警告来发现很多问题,然后通过Peganza的CodeHealer或Pascal Analyzer(PAL)进行测试。这些静态分析工具可以帮助您找到真正的代码问题。

You might also find lots of your problems by fixing all your hints and warnings, and then going through with CodeHealer or Pascal Analyzer (PAL) from Peganza. These static analysis tools can help you find real code problems.

如果性能和内存使用是您的问题,请获取完整版本的AQTime,并将其用于配置和观看您的系统运行。它将帮助您修复内存泄漏,并了解应用程序的运行时行为和内存使用情况,而不仅仅是漏洞,而是内存和CPU使用的瓶颈。其中一些瓶颈也可能是一些奇怪问题的根源。我甚至使用AQTime来帮助我找到死锁,因为它可以产生执行的痕迹,这可以帮助我找出运行的代码,找到死锁。 更新: AQTime不能安装在主开机机器以外的机器上,而不会违反新修改的AQTime许可条款。这些条款在过去的好日子里从来没有这样的限制。

If performance and memory usage are your problems, get the full version of AQTime, and use it to profile and watch your system operate. It will help you fix your memory leaks, and understand your app's runtime behaviour and memory usage, not just leaks but bottlenecks for memory and CPU usage. Some of those bottlenecks can also be the source of some odd problems. I have even used AQTime to help me find deadlocks, since it can generate traces of execution, that can help me figure out what code is running, and locate deadlocks. Update: AQTime is not installable on machines other than your main dev machine, without violating the newly modified license terms for AQTime. These terms were never this restrictive in the good old days.

如果您更确切地了解您的问题,我相信其他人可以给你一些想法是具体的,但以上所有都是一般技术,为我做的很好。

If you gave more exact idea of what your problems are, I'm sure other people could give you some more ideas that are specific, but all of the above are general techniques that have served me well.

这篇关于用于调试远程机器问题的技术和工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆