Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop "Just In Time Debugging" messages blocking a buildserver

Our buildserver (TeamCity, much recommended), runs our a whole bunch of testsuites on our finished c++ program.

Once in a whole, a test causes our program to crash, often bringing up a VisualStudio dialog offering me to JustInTime debug the crash. The dialog stops the buildserver from progressing. Instead of the build marked as failed, it just hangs. I've turned off the Just In Time debugging feature in VisualStudio, but when it's turned off, you still get a message "Couldn't JustinTime Debug this, you can turn it on in the options".

Does anybody know of a way to ensure that any unhandled exception in a program does not result in any modal dialog?

like image 966
Lucas Meijer Avatar asked Dec 12 '09 14:12

Lucas Meijer


People also ask

How do I stop JIT Debugging pop up?

You can configure Just-In-Time debugging from the Visual Studio Tools > Options (or Debug > Options) dialog box. To enable or disable Just-In-Time debugging: On the Tools or Debug menu, select Options > Debugging > Just-In-Time.

Why does JIT Debugging keep popping up?

Causes: Just-In-Time debugging is a feature that launches the Visual Studio debugger automatically when a program, running outside Visual Studio, encounters a fatal error. Just-In-Time debugging allows you to examine the error before the application is terminated by the operating system.

How do I fix Just-In-Time debugger in Visual Studio?

To configure the server to no longer show a dialog when an unhandled exception occurs (the default behavior prior to installing Visual Studio), use the registry editor to delete the following registry keys: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger.

How do I stop a Visual Studio Debug session?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.


1 Answers

This MSDN article explains how to disable Just-In-Time debugging on a Windows server. I've included the relevant portion of the article below:

After Visual Studio is installed on a server, the default behavior when an unhandled exception occurs is to show an Exception dialog that requires user intervention to either start Just-In-Time debugging or ignore the exception. This may be undesirable for unattended operation. To configure the server to no longer show a dialog when an unhandled exception occurs (the default behavior prior to installing Visual Studio), use the registry editor to delete the following registry keys:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger

On a 64-bit operating system also delete the following registry keys:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

like image 131
Emerick Rogul Avatar answered Sep 19 '22 15:09

Emerick Rogul