I need help learning to debug ASP MVC 5 apps. I'd like to be able to spit out the values of variables at any time the way you can with cfdump
in ColdFusion. Is this possible?
Asked
Active
Viewed 272 times
0

abalter
- 9,663
- 17
- 90
- 145
-
2You would leverage Visual Studio's breakpoints to see what variables are within scope. This is much better than dumping values to the screen, because you have control over the values (search for immediate window). https://msdn.microsoft.com/en-us/library/at313d3f.aspx – WorkSmarter May 06 '15 at 01:06
-
Yes, I started out doing that, but some variables are only created at run time, such as when you navigate to a certain page, right? How would I use a breakpoint in that case? – abalter May 06 '15 at 01:16
-
1Run your web application in debug mode and click through each page until you hit your specified breakpoint. – WorkSmarter May 06 '15 at 01:20
-
Here is another tool for your consideration http://www.asp.net/mvc/overview/performance/profile-and-debug-your-aspnet-mvc-app-with-glimpse – WorkSmarter May 06 '15 at 01:24
-
You may use tracing feature in asp.net application. – Pankaj May 06 '15 at 07:31