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

Delete (or rename) c:\windows\system32\vsjitdebugger.exe.

I tried deleting the registry keys, and I tried unchecking all the boxes in the Visual Studio options, but neither worked.

To be clear, my situation wasn't a C++ one. I was using Micro Focus COBOL for Visual Studio 2010, and by using the registry and VS options suggestions I managed to get rid of the "Want to debug?" dialog, but that resulted in a different dialog to hold up my automated process:

Visual Studio Just-In-Time Debugger

An unhandled exception ('COBOL runtime: Fault detected') occurred in CASDBC.exe [3564]. Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time.

Check the documentation index for 'Just-in-time debugging, errors' for more information.

OK


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


I would not recommend to edit/remove regs. Usually the registry is a mess to play with.

The solution that helps me is a quite simple. I`ve just added JIT debugger to my Visual Studio. Steps are:

  • Open Windows Control panel

  • Programs

  • Programs and Features

  • Find Visual Studio 2017

  • Click Change. On a new opened window navigate to the Individual Components tab
  • Check Just-In-Time debugger checkbox
  • Click modify

enter image description here

After VS reload the error should be fixed.