SDK Debugger
SDK Debugger
No matter how skilled a programmer you are, you are bound to make mistakes
once in a while. Tracking down problems in your code can be baffling without the
appropriate tool. Fortunately, the compiled nature of ASP.NET means that
debugging Web applications is no different than debugging any other managed
applications, and the .NET Framework SDK includes a lightweight debugger that
is perfectly suited for this task.
When you have enabled debugging for the application, you should issue a
request to the page you want to debug. This ensures that the ASP.NET runtime
process (Aspnet_wp.exe) is created and the application is loaded into memory.
To begin debugging:
Setting Breakpoints
To set a breakpoint in your page, click the left-hand margin on a line containing
an executable statement or function/method signature. A red dot appears where
the breakpoint is set. Move the mouse over the breakpoint to ensure that it is
appropriately mapped to the correct application instance in the Aspnet_wp.exe
process.
Reissue the request to the page from your browser. The debugger will stop at
the breakpoint and gain the current window focus. From this point, you can
step, set variable watches, view locals, stack information, disassembly, and so
on. You can see the intrinsic objects on the page, like Request, Response, and
Session by using this (C#) or Me (VB) in the watch window.
Section Summary