配置“应用程序验证器”在视觉工作室中
我发现我可以启动应用程序验证程序 在 Visual Studio 2008 中通过调试 -> 使用应用程序验证程序启动
。但是应用程序验证程序文档显示了一堆可以配置的选项如果它的 UI 与 Visual Studio 分开启动。我不知道如何在 Visual Studio 中设置这些选项。
这变成了一种权衡。如果我从“调试”菜单启动应用程序验证器,我会从应用程序验证器获得有关执行中缺陷的 IDE 集成响应。如果我从外部启动应用程序验证器并配置特定选项,它仍然会导致在 Visual Studio 调试期间发生“停止”,但随后我不会获得 IDE 集成应用程序验证器输出。
有谁知道如何访问应用程序验证器的配置功能,并且仍然拥有 VS 完全集成的体验?
I see that I can launch application verifier within Visual Studio 2008 via Debug->Start With Application Verifier
. But the documentation for app verifier shows a bunch of options that can be configured if it's UI is launched separately from Visual Studio. I can't figure how to set those options from within Visual Studio.
It turns into a trade-off. If I launch app verifier from the Debug menu, I get an IDE integrated response from app verifier about flaws in my execution. If I launch app verifier externally, and configure specific options, it still causes a "stop" to occur during my Visual Studio debugging, but then I don't get the IDE integrated app verifier output.
Does anyone know how to access the configuration capabilities of app verifier, and still have the VS fully-integrated experience?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我经常在工作场所使用应用程序验证器,使用 VS2005 和 Windbg,所以我可以告诉你它是如何工作的。
首先,您应该启动应用程序验证器独立应用程序,以便将您的应用程序添加到应用程序验证器检测的应用程序列表中。然后,在主对话框的“测试”右窗格中,您可以选择希望验证程序验证的应用程序的不同方面。
但是,检查不同的测试是不够的,您必须配置它们,以便它们的行为符合您的要求。
在您的问题中,您提到了当验证者发现错误时调试器在执行期间停止(中断)的“问题”。此行为可通过应用程序验证器 UI 进行配置。当您检查要测试的类别时,右键单击它,然后选择“验证程序停止选项”。然后,您将看到出现以下对话框:
在此对话框中,对于验证器所遇到的每种错误类型,可以检测(在左侧的验证器停止列表中列出),您将获得错误的描述,并且您可以指定是否希望验证器完全忽略此类错误(通过选中“非活动”),或者如果您希望附加的调试器在发生此类错误时中断、引发异常或仅记录到文件。
您还可以指定是否希望多次报告错误或每次应用程序运行仅报告一次错误。
在您的特定情况下,由于您不希望调试器在每次发现错误时都中断,因此您应该只检查日志记录选项以及“无中断”单选按钮,除了验证程序可以找到的最严重的错误(为此,您可能希望调试器中断,以便在重现问题时跟踪并查看问题所在)。
正确设置选项后,您可以关闭应用程序验证程序应用程序(设置将保存到注册表中),并从 Visual Studio 启动您的应用程序。
Visual Studio 的“输出”窗口应包含验证程序发现的错误日志。
应用程序验证器生成的日志可通过验证器 UI 通过“查看”->“日志”菜单项进行访问。
I often use Application verifier at my workplace, with VS2005 and with Windbg, so I can tell you a bit how it works.
First, you should launch the Application Verifier standalone application in order to add your application to the list of applications instrumented by Application verifier. Then, in the 'Test' right pane of the main dialog, you can select different aspects of your application you want the verifier to verify.
But, it is not enough to check the different tests, you must configure them so they behave like you want them to.
In your question, you mention having the 'problem' of having the debugger stop (break) during execution when an error is found by the verifier. This behaviour is configurable from the Application verifier UI. When you check a category to test, right click on it, and select 'Verifier Stop Options'. You will then see the following dialog appear:
In this dialog, for each type of error that the verifier can detect (listed in the Verifier Stop list on the left), you will get a description of the error, and you can specify if you want the Verifier to completely ignore this kind of error (by checking 'Inactive'), or if you want an attached debugger to break, throw an exception or just log to a file when such an error occurs.
You can also specify if you want the error to be reported multiple times or just once per application run.
In your specific situation, since you do not want the debugger to break each time an error is found, you should just check the logging options, along with the 'No Break' radio button, except maybe for the most critical errors the verifier can find (for which you might want the debugger to break in order to trace and see what the problem is while you reproduce the issue).
When your options are set properly, you can then close the Application verifier application (settings will be saved to the registry), and launch your application from Visual Studio.
The 'Output' window of Visual Studio should contain logs of errors found by the verifier.
The logs generated by the Application Verifier are accessible from the verifier UI, via the View->Logs menu item.