Monday, 15 October 2007

Debugging CodeSmith Templates in Windows Vista

I had some problems with Windows Vista trying to debug the PLINQO (Professional Linq) CodeSmith templates. To get around the problems of crashing and restarting ( As described by Paul Welter,

"There are some problems with using the Just-In-Time debugger in Windows Vista. First you need to make sure you have all the latest service packs installed. Next, the debugger in Vista will cause CodeSmith to hang when you finish debugging. You can work around this issue by updating the Just-In-Time debugger setting DbgJITDebugLaunchSetting. The setting is found in the registry at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]. Change the value of DbgJITDebugLaunchSetting to 2. This will cause the debugger dialog to be displayed immediately when your code hits a breakpoint. This will also allow control to return to CodeSmith when you continue the execution of the template from the debugger."

Note that the original value on my Vista machine was 10 Hex (16).

1 comment:

Anonymous said...

This fixed my problem! Note that I am using XP... I was my second day into a stand still with this problem, and almost just dismissed this, but it turns out to be precisely the problem. Also note that the original value for me was 16 as well.