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:
I had the same trouble. Try this "Debug->Options->Debugging:General-> set checkbox on the Use Managed Compatibility Mode".
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With