gpt4 book ai didi

visual-studio-2008 - 如何防止 Server 2008 R2 开发箱上出现 "... has stopped working"窗口?

转载 作者:行者123 更新时间:2023-12-04 16:37:25 25 4
gpt4 key购买 nike

我使用 Windows Server 2008 x64 R2 机器作为开发盒。在许多其他事情中,我已经安装了 Visual Studio 2008 SP1。当我处理一个项目时,我有时需要使用 Debug > Start without Debugging (Ctrl + F5)。如果程序抛出异常,则会出现一个新的 R2 样式窗口。我很确定我没有在我的 XP 机器上看到这个 - 这是我第一次直接在服务器上开发。有什么办法可以避免这种情况 - 它真的开始困扰我了吗?

例如。我当前的项目正在访问 WCF 服务 - 我正在使用 Ctrl+F5 启动控制台程序客户端。我运行它并得到窗口。标题是我刚刚开始的项目的名称,它包含:

[insert-project-name-here] has stopped working

Windows can check online for a solution to the problem.

--> Check online for a solution and close the program

--> Close the program

--> Debug the program

V View problem details.

单击“关闭程序”实际上会关闭窗口,并且控制台中会出现异常消息,这正是我想要的(但没有额外的窗口处理)。

我怎样才能避免这种烦恼?

最佳答案

Just-In-Time Debugging on Windows Vista and 2008 Server

By default on Windows Vista, the just-in-time debugger is configured to display a user-friendly dialog shown below. Although you can click the Debug the program button and start the debugger successfully, your original Visual Studio instance will hang in the end of the debugging session.

In order to avoid having to constantly kill the Visual Studio process after debugging, you will want to change Just-In-Time debugger configuration to work the same way it does on Windows XP and Windows Server 2003. This configuration is stored in registry as DbgJITDebugLaunchSetting value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework key. It’s default value on Windows Vista is 0×10. Change it to 0×2, which is the default value on Windows XP. After making this change, you should no longer see the User-Defined Breakpoint dialog and will be able to continue using Visual Studio after debugging.



来自 this page并向下滚动到“Windows Vista 和 2008 Server 上的即时调试”

另请注意:如果您运行的是 x64,则 key 将位于 WOW 部分。

关于visual-studio-2008 - 如何防止 Server 2008 R2 开发箱上出现 "... has stopped working"窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2507464/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com