How can I easily view the contents of a ViewBag while debugging ASP.NET MVC controllers in Visual Studio?
As a workaround, I use temporary variables:
string tmp = ViewBag.MyData;
So, the problem is that viewing ViewBag.MyData
directly is difficult, tmp
is easy.
To view the contents of ViewBag when debugging: