Cancel
Showing results for 
Search instead for 
Did you mean: 

Just-in-time debugging of rules

Siemens Genius Siemens Genius
Siemens Genius

While we all tend to only write perfect rules Smiley Happy, on those rare occasions that we need to hunt down a problem, attaching a debugger as an exception, or stop statement, or stop from setting the debugging flag in Engineer would be especially helpful. This used to be easy, but security enhancements from Microsoft have made this more of a challenge. Now, when an exception (or stop statement) is encountered, the typical reaction is that .NET ignores it or displays an exception was encountered and only let's you terminate the process.

 

If you want to be able to run a just-in-time degugger like we used to, here are the steps to follow: 

 

First, in your Visual Studio Tools->Options dialog, make sure the JIT debugger is enabled as shown in the image below.

VS_Options.png

 

Next, Go into RegEdit and look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework folder. Make sure you have the "DbgJITDebugLaunchSetting" set to hex 10 (decimal 16) and that the DbgManagedDebugger is set to a valid debugger that is installed on your machine as shown in the image below.NETSettings.png

 

Finally, in RegEdit, look at the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\AeDebug  folder. Make sure the "Auto" key is set to 1 and the Debugger is set to the same debugger as above.

WindowsSettings.png

 

This should make .NET behave as it used to with JIT debugging possible from within Rulestream.