问题
After Updating Visual studio 2015 from VS2015 Update 1 to Update 2. I can no longer watch or inspect variable values during T4 template debugging
As you can see, the watched variables are not found in the current context. This was previously working in Visual Studio 2015 update 1
Here is a Screenshot in visual studio while debugging a T4 template:
回答1:
I had the same trouble. Try this "Debug->Options->Debugging:General-> set checkbox on the Use Managed Compatibility Mode".
回答2:
This looks like a bug that was introduced in Visual Studio 2015 Update 2. Essentially the debugger is unable to inspect local variables in dynamic modules and it may be causing the behavior you are seeing. We released a hotfix for it today. You can download the patch here. Documentation for the patch is here. Let me know if the patch does not fix your particular scenario.
Thanks!
-Patrick Nelson
来源:https://stackoverflow.com/questions/36396156/unable-to-watch-variables-during-debug-of-t4-templates-after-updating-to-visual