简体   繁体   English

应用程序验证程序是DEBUG还是RELEASE模式?

[英]application verifier DEBUG or RELEASE mode?

I have a corruption memory heap with my application. 我的应用程序有损坏的内存堆。 I would like to use Application Verifier in order to find the bug. 我想使用Application Verifier来查找错误。

I have some difficulties to find a tutorial on how use Application Verifier. 我很难找到有关如何使用应用程序验证程序的教程。

One of the first question I'm wondering is should I use my application in DEBUG or RELEASE mode ? 我想知道的第一个问题是我应该在DEBUG或RELEASE模式下使用我的应用程序吗?

Thanks 谢谢

Typically, in debug mode with a debugger attached will be your first stop. 通常,在调试模式下连接调试器将是您的第一站。 This provides full run-time checks, more validation, and more accurate information on what is going wrong. 这样可以提供完整的运行时检查,更多的验证以及关于出了什么问题的更准确的信息。 Application Verifier can also signal the debugger to break and will output error information, so having a debugger attached is very useful. Application Verifier还可以向调试器发出信号,通知其中断并输出错误信息,因此连接调试器非常有用。

After that, as Simon Richter noted, you'll want to run most of it again in release. 之后,正如Simon Richter所指出的,您将希望在发行版中再次运行其中的大部分内容。 Release builds typically don't have the same checks and don't watch for errors, so things are very likely to surface that weren't an issue in the debug build. 发布版本通常没有相同的检查,也不会监视错误,因此很可能浮出水面,这在调试版本中并不是问题。 There is some use for a sort of manual-debug or hybrid build, where you perform some of the checks and logging to make sure things don't go too far afield. 有一种用于手动调试或混合构建的用途,您可以在其中执行一些检查和日志记录,以确保事情不会走得太远。

To use Application Verifier, you really just need to start it, add an application and enable to desired tests. 要使用Application Verifier,您实际上只需要启动它,添加一个应用程序并启用所需的测试即可。 When you run, it will create a log and send messages/breaks to a debugger if one is around. 运行时,它将创建一条日志,并将消息/中断发送给调试器(如果有的话)。

With the necessary experience in debugging, "Both" would be the right answer, as the differences between Debug and Release builds also give good hints about the source of the problem. 拥有必要的调试经验,“两者”都是正确的答案,因为Debug和Release版本之间的差异也为问题的根源提供了很好的提示。

If you do not want to dive that deep into the inner workings of the compiler, then use the Debug version if the error appears there reliably. 如果您不希望深入了解编译器的内部工作原理,请使用Debug版本,如果错误可靠地出现在该版本中。

通常,调试版本会运行应用程序验证程序以查找应用程序中的错误。

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

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