Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Day 20. Debugging ASP.NET Pages
This workshop will help reinforce the concepts covered in today's lesson. The answers can be found in Appendix A.
Will the following code snippet work?
try objCmd.Connection.Open objReader = objCmd.ExecuteReader end try
True or False: The finally statement is required in a try...catch block.
What is the trace tool, and how do you enable it at the page level? At the application level?
What's the difference between Trace.Write and Trace.Warn?
True or False: Trace.Write and Trace.Warn print information in the client display.
What are symbol files?
True or False: Attaching a debugger to an application is a perfectly safe procedure and doesn't interrupt program usage.
What's a breakpoint, and what is it used for?
Use the trace tool to compare performance times in your application. Determine if disabling viewstate results in faster execution times, what the difference is between using an OleDbDataReader versus a DataSet, and if comments affect execution times at all.
Explore the CLR debugger and step through the execution of several pages. Use the Watch window to watch your variables as your application progresses. Try purposely introducing some errors and see what happens in the debugger.