barcode vb.net source code Examining Values: The Autos and Locals Windows | in C#

Create Code 128 Code Set B in C# Examining Values: The Autos and Locals Windows |

Examining Values: The Autos and Locals Windows |
ANSI/AIM Code 128 Drawer In Visual C#.NET
Using Barcode printer for .NET Control to generate, create Code 128 Code Set A image in .NET framework applications.
www.OnBarcode.com
Decoding Code 128 Code Set B In Visual C#
Using Barcode decoder for .NET framework Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
To see how this works, put a breakpoint on the first line of the Run( ) method and run the program. When the program stops, press F10 to step over the creation of the new Box object. The Autos window shows you that the new Box has been created, as shown in Figure 9-9. Because box1 has just been created, it is shown in red. Notice the plus sign (+) next to box1. box1 is a member of the Box class, as you know, and that class has several members. Clicking the plus sign reveals the internal state of this object, as shown in Figure 9-10. Press F11 a few more times, and you ll see that the Autos window changes to show you the new values, appropriate to the current line of code. As mentioned earlier, the Locals window lets you look at all the variables in the current method simultaneously. If you look at the Locals window while the execution is in the Box constructor, you ll see the local variables theLength, theWidth, and theHeight (the parameters to the constructor) and this (the current object).
Barcode Creator In Visual C#.NET
Using Barcode generator for .NET framework Control to generate, create Barcode image in Visual Studio .NET applications.
www.OnBarcode.com
Print EAN13 In Visual C#.NET
Using Barcode encoder for Visual Studio .NET Control to generate, create EAN 13 image in Visual Studio .NET applications.
www.OnBarcode.com
|
Matrix Barcode Drawer In Visual C#
Using Barcode generation for VS .NET Control to generate, create Matrix 2D Barcode image in VS .NET applications.
www.OnBarcode.com
Encoding Code 39 Full ASCII In Visual C#
Using Barcode maker for Visual Studio .NET Control to generate, create USS Code 39 image in VS .NET applications.
www.OnBarcode.com
9: Basic Debugging
Encoding Barcode In C#.NET
Using Barcode creator for Visual Studio .NET Control to generate, create Barcode image in VS .NET applications.
www.OnBarcode.com
Drawing Universal Product Code Version E In C#.NET
Using Barcode generator for VS .NET Control to generate, create Universal Product Code version E image in .NET framework applications.
www.OnBarcode.com
Expand the this variable, and you ll see the Box object, with its members uninitialized. Press F11 to progress through the assignment of values to the member variables of the Box class. As you press the F11 key, the update is reflected in the Locals window, as shown in Figure 9-11.
Code 128 Code Set A Drawer In Objective-C
Using Barcode generator for iPad Control to generate, create ANSI/AIM Code 128 image in iPad applications.
www.OnBarcode.com
Code-128 Decoder In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Examining Values: The Autos and Locals Windows |
Printing 2D In VS .NET
Using Barcode creator for ASP.NET Control to generate, create 2D Barcode image in ASP.NET applications.
www.OnBarcode.com
USS Code 128 Generator In None
Using Barcode encoder for Font Control to generate, create Code 128 image in Font applications.
www.OnBarcode.com
Explore the Locals and Autos windows as you step through the program. When you want to stop, choose the Stop Debugging item from the Debug menu to stop processing and return to the editor.
Recognizing PDF 417 In .NET
Using Barcode reader for VS .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
Barcode Generator In None
Using Barcode maker for Online Control to generate, create Barcode image in Online applications.
www.OnBarcode.com
Setting Your Watch
Printing Barcode In .NET Framework
Using Barcode generation for Reporting Service Control to generate, create Barcode image in Reporting Service applications.
www.OnBarcode.com
Generate 2D In Visual Basic .NET
Using Barcode drawer for .NET Control to generate, create Matrix 2D Barcode image in VS .NET applications.
www.OnBarcode.com
When you re debugging a program with many local variables, you usually don t want to watch all of them; you need to keep track of only a few. You can track specific variables and objects in the Watch window. You can have up to four Watch windows at a time in Visual Studio, but just the one in C# Express. Watch windows are like by-invitation versions of the Locals window; they list the objects you ask the debugger to keep an eye on, and you can see their values change as you step through the program, as illustrated in Figure 9-12.
Encoding EAN / UCC - 14 In .NET
Using Barcode generator for Visual Studio .NET Control to generate, create UCC - 12 image in .NET framework applications.
www.OnBarcode.com
Paint Barcode In .NET
Using Barcode printer for .NET framework Control to generate, create Barcode image in VS .NET applications.
www.OnBarcode.com
The Watch windows are usually tabbed with the Locals window. You can add a watch by right-clicking on a variable and choosing Add Watch or you can just drag the variable to the Watch window. The variable will be added to your Watch window. To remove a variable that you ve added to your Watch window, you can rightclick on it in the Watch list and select Delete Watch. In Visual Studio only, if you just need to peek at a variable, and perhaps to experiment with manipulating its value, you can right-click on it and choose QuickWatch, which opens a dialog box with watch information about a single object, as shown in Figure 9-13. You can enter any expression into the Expression field and evaluate it from within the QuickWatch window. For example, suppose you had a QuickWatch on the length variable, which is set to 4.
Drawing Barcode In None
Using Barcode drawer for Software Control to generate, create Barcode image in Software applications.
www.OnBarcode.com
Encode ECC200 In Visual Studio .NET
Using Barcode creator for ASP.NET Control to generate, create DataMatrix image in ASP.NET applications.
www.OnBarcode.com
|
9: Basic Debugging
If you want to know the impact of multiplying length by width (set to 8), enter:
length * width
into the Expression window and click Reevaluate. The value is shown in the Value window, as in Figure 9-14. If you decide that you want to add the variable to a Watch window after all, click the Add Watch button.
The Call Stack
As you step in and out of methods, the Call Stack window keeps track of the order and hierarchy of method calls. Figure 9-15 shows a close-up picture of the Call Stack window. You can see that the Box constructor was called by the Run( ) method, while the Run( ) method was in turn called by Main( ). In this case, if you double-click on the second line in the Call Stack window, the debugger shows you the line in Run( ) that called the Box constructor, as shown in Figure 9-16. Notice that the debugger puts a green curved arrow on the line in the call stack you ve double-clicked on, and a matching arrow in the editor to the line that corresponds to that call. This way, if you re debugging a method and you think the data causing the problem came from outside the method, you can quickly find where the method call came from and check the values at that point.
Copyright © OnBarcode.com . All rights reserved.