- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Setting a Breakpoint | in Visual C#.NET
Setting a Breakpoint | Create Code 128 In C#.NET Using Barcode maker for Visual Studio .NET Control to generate, create Code 128 Code Set C image in .NET applications. www.OnBarcode.comRecognize Code128 In C# Using Barcode reader for .NET Control to read, scan read, scan image in Visual Studio .NET applications. www.OnBarcode.comnow has a yellow arrow in it. If you had more than one breakpoint in your program, the arrow would show you which one you re stopped at now. The statement that s about to be executed is highlighted in yellow to help you find it. Also, a number of helpful windows are open, and we ll get to those in a moment. The most useful feature of the debugger is the ability to step into the code, or execute the program one line at a time, watching the changes that happen with each line. To step into the code, press the F11 function key twice. With the first key press, the Tester object is created. The second key press moves you to the next line in the code, which calls the Run( ) method. Press the key once more to step inside the code for the Run( ) method where the program creates a new Box object, box1. F11 and F10 are the step command keys. The difference is that F10 steps over method calls, whereas F11 steps into them. With F10, the methods are executed, but you don t see each step within the method in the debugger; the highlighting jumps to the next statement after the method call. When you step into the method call with F11, on the other hand, the highlighting will move to the first line of the called method. If you use F11 to step into a method you actually meant to step over, Shift-F11 will step you out. The method you stepped into will run to completion, and you ll break on the first line back in the calling method. UCC.EAN - 128 Drawer In Visual C#.NET Using Barcode encoder for .NET Control to generate, create USS-128 image in Visual Studio .NET applications. www.OnBarcode.com1D Barcode Printer In C# Using Barcode creation for Visual Studio .NET Control to generate, create Linear 1D Barcode image in VS .NET applications. www.OnBarcode.com| Barcode Generation In Visual C# Using Barcode generation for .NET Control to generate, create Barcode image in .NET applications. www.OnBarcode.comCode-39 Maker In Visual C# Using Barcode encoder for VS .NET Control to generate, create Code 39 Extended image in .NET framework applications. www.OnBarcode.com 9: Basic Debugging
Code 128 Code Set B Drawer In C#.NET Using Barcode drawer for VS .NET Control to generate, create USS Code 128 image in VS .NET applications. www.OnBarcode.comUPC Case Code Creation In Visual C# Using Barcode encoder for Visual Studio .NET Control to generate, create UCC - 14 image in .NET framework applications. www.OnBarcode.comUsing the Debug Menu to Set Your Breakpoint
Code 128 Decoder In Visual C# Using Barcode recognizer for VS .NET Control to read, scan read, scan image in VS .NET applications. www.OnBarcode.comCode 128C Creator In Visual Studio .NET Using Barcode generation for ASP.NET Control to generate, create Code 128 Code Set A image in ASP.NET applications. www.OnBarcode.comIn Visual Studio, but not C# Express, instead of clicking in the margin to set your breakpoint, you can use Debug New Breakpoint Break at Function (or use the keyboard shortcut for the menu item, Ctrl-D, N). This brings up the New Breakpoint dialog box, as shown in Figure 9-3. In this dialog box, you can specify the name of the method where you want to break, and even the line and character within the method, if you know them. You can also examine and manipulate all the breakpoints together in the Breakpoints window, as shown in Figure 9-4. You can access this window in Visual Studio by selecting Debug Windows Breakpoints, or by pressing Ctrl-Alt-B. Unfortunately, this window is completely unavailable in C# Express, which is probably the greatest deficiency in its debugging suite. Code 128 Code Set B Encoder In .NET Using Barcode maker for Reporting Service Control to generate, create Code 128B image in Reporting Service applications. www.OnBarcode.comReading Barcode In Visual Basic .NET Using Barcode Control SDK for .NET Control to generate, create, read, scan barcode image in .NET applications. www.OnBarcode.comSetting Conditions and Hit Counts
Creating Barcode In VS .NET Using Barcode generator for .NET Control to generate, create Barcode image in .NET applications. www.OnBarcode.comMaking Data Matrix ECC200 In .NET Using Barcode printer for VS .NET Control to generate, create ECC200 image in .NET applications. www.OnBarcode.comThe default behavior is for the breakpoint to cause the program to break every time you pass that line of code. Sometimes you only want to break (for example) every 20th time it passes that line of code, or only if the value of some variable is greater than, for example, 0. You can set conditions on the breakpoint by right-clicking on it in the Editor window or in the Breakpoints window, as shown in Figure 9-5. Quick Response Code Creator In Objective-C Using Barcode maker for iPhone Control to generate, create QR Code image in iPhone applications. www.OnBarcode.comBarcode Maker In Objective-C Using Barcode drawer for iPhone Control to generate, create Barcode image in iPhone applications. www.OnBarcode.comSetting a Breakpoint |
EAN-13 Supplement 5 Reader In VB.NET Using Barcode scanner for .NET framework Control to read, scan read, scan image in .NET framework applications. www.OnBarcode.comDraw EAN / UCC - 13 In .NET Using Barcode printer for Reporting Service Control to generate, create EAN 13 image in Reporting Service applications. www.OnBarcode.comIn C# Express, you ll see only the first two options on this menu: Delete Breakpoint and Disable Breakpoint. In Visual Studio, you can choose either Hit Count or Condition. If you choose Hit Count, you are offered variations such as break when the hit count is a multiple of , as shown in Figure 9-6. If you choose Condition, an open-ended condition text box is provided. In Figure 9-7, we have typed in theValue > 20 as an example. Encoding Barcode In .NET Framework Using Barcode generator for Reporting Service Control to generate, create Barcode image in Reporting Service applications. www.OnBarcode.comDrawing GS1 128 In Java Using Barcode generation for Java Control to generate, create GS1 128 image in Java applications. www.OnBarcode.comExamining Values: The Autos and Locals Windows
Look at the tabs below the code window if you re using Visual Studio, you ll find a Locals window and an Autos window, possibly as tabs in a single window along with some others. If you re using C# Express, the Autos window won t be there, but Locals will be. Both of these display your local variables. The difference is that the Autos window shows variables used in the current statement and the previous statement. (The current statement is the statement at the current execution location, which is highlighted automatically in the debugger thus, the window s name.) The Locals window displays all the variables in the current method, including parameters, as shown in Figure 9-8, along with each variable s current value and type. The debugger stacks the Autos and Locals windows together with other tabs, as shown in Figure 9-8. You are free to separate these windows or to move them to be tabbed with other windows. You can simply drag-and-drop the windows where you want them. When you drop one window onto another, the two windows are tabbed together.
|
|