1328 Visual Studio .NET Debugger Appendix D To enable the debugging features, the program must be compiled using the debug configuration. To set breakpoints, click the gray area to the left of any line of code. Alternatively, right-click a line of code and select Insert Breakpoint. The Watch window allows the programmer to examine variable values and expressions. To examine data, type a valid Visual Basic expression, such as a variable name, into the Name field. Once the expression has been entered, its type and value appear in the Type and Value fields. Variables in the Watch window can be modified by the user for testing purposes. To modify a variable s value, click the Value field and enter a new value. The Locals window displays the name and current value for all the local variables or objects in the current scope. The Autos window displays the variables and objects used in the previous statement and the current statement (indicated by the yellow arrow). To evaluate an expression in the Immediate window, simply type the expression into the window and press Enter. The Continue button resumes execution of a suspended program. The Stop Debugging button ends the debugging session. The Break All button allows the programmer to place an executing program in break mode. The Show Next Statement button places the cursor on the same line as the yellow arrow that indicates the next statement to execute. The Step Over button executes the next executable line of code and advances the yellow arrow to the following executable line in the program. If the line of code contains a method call, the method is executed in its entirety as one step. The Hex button toggles the display format of data. If enabled, Hex displays data in a hexadecimal (base 16) form, rather than decimal (base 10) form. The Breakpoints window displays all the breakpoints currently set for a program. Disabled breakpoints allow the programmer to maintain breakpoints in key locations in the program so they can be used again when needed. The Call Stack window contains the program s method call stack, which allows the programmer to determine the exact sequence of calls that led to the current method and to examine calling methods on the stack. The Step Over button executes one statement in a method, then pauses program execution. The Step Into button executes next statement. If the statement contains a method call, control transfers to the method for line-by-line debugging. If the statement does not contain a method call, Step Into behaves like Step Over. The Step Out finishes executing the method and returns control to the line that called the method. The Immediate window is useful for testing arguments passed to a method. This helps determine if a method is functioning properly. Visual Studio .NET includes class debugging features which allow the programmer to determine the current state of any objects used in a program. To assist class debugging, Visual Studio .NET allows the programmer to expand and view all data members variables and properties of an object, including those declared private.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.