Web server - 1326 Visual Studio .NET Debugger Appendix D 54

1326 Visual Studio .NET Debugger Appendix D 54 // constructor 55 public DebugClass( string stringData, 56 object objectData ) 57 { 58 someString = stringData; 59 privateObject = objectData; 60 } 61 62 // accessor property for someString 63 public string SomeString 64 { 65 get 66 { 67 return someString; 68 } 69 70 set 71 { 72 someString = value; 73 } 74 } // end property SomeString 75 76 } // end class DebugClass 77 78 } // end namespace ClassDebug Fig. D.21 Fig. D.21Fig. D.FiFi21g. D.21g.D.21Object debugging example. (Part 2 of 2.) Fig. D.22 Fig. D.22Fig. D.FiFi22g. D.22g.D.22Breakpoint location for class debugging. To assist class debugging, Visual Studio .NET allows the programmer to expand and view all data members and properties of a class, including privatemembers. In any of the three windows (i.e., Watch, Locals, Autos and This), a class that has data members is displayed with a plus (+) (Fig. D.23). When a programmer clicks the plus box, all the object s data members and their values display. If a member references an object, the object s data members also can be listed by clicking the object s plus box. Many logic errors are the result of incorrect array calculations. To simplify the identification of such errors, the debugger includes the ability to display all the values in an array. Figure D.24 displays the contents of the list array. The object at index 0 is and int array, which is expanded to show its contents. Index 1contains a DebugClassobject expanded to show the object s private data members, as well as a public property. Index 2contains a Randomobject, defined in the Framework Class Library (FCL). The Visual Studio debugger contains several other debugging windows, including Threads, Modules, Memory, Disassembly and Registers. These windows are used
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Leave a Reply