TAILIEUCHUNG - Professional ASP.NET 1.0 Special Edition- P42
Professional Special Edition- P42:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | This shows the processes you can pick to debug. Make sure you have the Show system processes checkbox box selected and pick the process - this is the worker process. Click the Attach. button to attach the debugger to the process and then close the dialog. You can now load a page into the debugger by using File Open and set break points by clicking in the gray margin This shows a breakpoint in a simple page coded using JScript unlikely for most people but there s a point to it - bear with me . This page simply instantiates a class called Programmer. If you now hit the page you are flipped into the debugger at the set line You can now step into the code for the component assuming it was compiled with the debug option Locate Debugging .asps Read Criy Programmer vb Head Only public Sub Hev MyEase hNetr i End SUb Public Sub Ne v f ir s tNaniE As String InitNcune 9 String MyBase .Neu icstNaine IsstJJame End SUb Public Sub Nett f IratJfeniE As String lantNaone As String hduraSleep As Integ MyEase .Neu irstNaire laatNarde _avgHours31EEpFerNight hour3Sleep End Suh Now we ve stepped into the constructor of the Programmer class and notice that it is a Visual Basic class. We are almost at that point I was trying to make - let s go one step further and step into the base class Locals Read Orty Programmer-vb Readonly Read Only public class person private string _firstNaine private string _lastrJame public person ub lie person string f irstNaine string laatNsme _firstNaite firstName lastName lastName Now the point is made. We have a base class written in C which is sub-classed by a Visual Basic class and used in a JScript ASP page. This becomes obvious when examining the call stack This really reinforces the concept of language equality in the runtime since you can debug through components written in different languages. Even if it were restricted to a single language the fact that we have such a good debugger would be a .
đang nạp các trang xem trước