DebugBreak not breaking

I finally found the solution for Windows 10 here: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/enabling-postmortem-debugging

And also: https://docs.microsoft.com/en-us/windows/desktop/Debug/configuring-automatic-debugging

To enable automatic debugger launch, you should add a registry value:

  • key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug, value Auto = 1 (of type REG_DWORD)

The configured debugger is set the by the value Debugger (type REG_SZ); a Visual Studio installation sets this to:

"C:\WINDOWS\system32\vsjitdebugger.exe" -p %ld -e %ld

Note that on 64 bit OS this only works for 64 bit executables. To enable the same behaviour in 32 bit executables set the same values in this key:

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

Finally I found the cause of the issue. It's a Vista/Win7 cause:

  1. Open The Action center control
  2. Goto Action Center settings
  3. Goto Problem Reporting Settings
  4. Choose "Each time a problem occurs, ask me before checking for solution"

Although this is more of IT solution/question I've been plagued with this problem all day and wanted to share the solution with other developers who encounter this problem.


In that case...

http://community.codesmithtools.com/blogs/blake/archive/2009/06/03/tips-amp-tricks-debugging-codesmith-on-microsoft-windows-7.aspx

Here is the quick overview of what you need to-do to enable debugging on a Microsoft Windows 7 machine:

Update the Just-In-Time debugger setting DbgJITDebugLaunchSetting. The setting is found in the registry at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework].
Set the value of DbgJITDebugLaunchSetting to 2. If you are using a 64bit operating system then you must also set the same key (DbgJITDebugLaunchSetting) in this folder [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework] to 2. If you run into any issues try running CodeSmith Studio and Visual Studio as an administrator. Now when CodeSmith enters a break point you will see something like this: