views:

290

answers:

2

I'm using a Windows Server 2008 x64 R2 machine as a development box. Amongst many other things I've got Visual Studio 2008 SP1 installed on it. When I'm working on a project, I sometimes need to use Debug > Start without Debugging (Ctrl + F5). If the program throws an exception, I get a new R2-style window appear. I'm pretty sure I didn't see this on my XP box - this is the first time I've developed directly on a server. Is there any way to avoid this - it's really beginning to bug me?

E.g. my current project is accessing a WCF service - I'm using Ctrl+F5 to start a console program client. I run it and get the window. The title is the name of the project I've just started and it contains:

[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.

Clicking on "Close the program" will actually close the window and the exception message appears in the console, which is what I want (but without the extra window-faffing).

How can I avoid this annoyance?

+3  A: 

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.

from this page and scroll down to 'Just-In-Time Debugging on Windows Vista and 2008 Server'

Also note: if you are running x64 the key is going to be in the WOW section.

Sky Sanders
Thanks for that and, in particular, for the reminder about WOW. +1 for that.
serialhobbyist
+1  A: 

Or you can try this:

  1. Click start and type gpedit.msc on search bar or on RUN command
  2. Now navigate to Computer Configuration -> Administrative Templates -> System -> Internet Communication Management, and then click Internet Communication settings
  3. Locate Turn off Windows Customer Experience Improvement Program , double click or right click edit.
  4. Click on Enable . Apply and Ok and close gpedit window.

(credits go to http://social.answers.microsoft.com/Forums/en-US/w7files/thread/291c0945-c41f-4c8b-bca1-6b6d0836f62a)

Francois