Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Getting started with MPLAB Launch MPLAB Set Toolbar as in the next slide by clicking the leftmost icon Open a new Source file by choosing [FILE][NEW] Type.
Introduction to HT-IDE3000 Micro-C development System Department.
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Why care about debugging? How many of you have written a program that worked perfectly the first time? No one (including me!) writes a program that works.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
BIM313 – Advanced Programming Techniques Debugging 1.
MT311 Tutorial Li Tak Sing( 李德成 ). Uploading your work You need to upload your work for tutorials and assignments at the following site:
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1 Lab Session-2 CSIT 121 Spring 2005 Debugging Tips NiMo’s Varying Rates Lab-2 Exercise.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Finding and Debugging Errors
How to Debug VB .NET Code.
Guidelines for working with Microsoft Visual Studio.Net.
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
Guidelines for working with Microsoft Visual Studio 6.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
CIT 590 Debugging. Find a laptop Please take a moment to open up your laptop and open up Eclipse. If you do not have a laptop, please find a friend. If.
DEBUGGERS For CS302 Data Structures Course Slides prepared by TALHA OZ (most of the text is from
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Using a Debugger. SWC What is ”debugging”? An error in a computer program is often called a ”bug”… …so, to ”debug” is to find and get rid of errors in.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
Debugging Projects Using C++.NET Click with the mouse button to control the flow of the presentation.
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
VB – Debugging Tools Appendix D. Why do we need debugging? Every program has errors, and the process of finding these errors is debugging Types of errors.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
CS320n –Visual Programming More LabVIEW Foundations.
NETBEANS DEBUGGER.  To create a breakpoint place the cursor at the desired location.  Go to the Run -> toogle line Breakpoint or Ctrl +F8. It creates.
Debugging 1/6/2016. Debugging 1/6/2016 Debugging  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a program.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 3: Chapter 3: Slide 1 Unit 3 Formatting Chapter 3 Input, Variables, Constants,
Debug in Visual Studio Windows Development Fundamentals LESSON 2.5A.
5.01 Understand Different Types of Programming Errors
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Visual Basic Integrated Development Environment (IDE) 56:150 Information System Design.
CSC 1201 LAB RULES Nouf Aljaffan (C) CSC 1201 Course at KSU.
E Copyright © 2007, Oracle. All rights reserved. Using JDeveloper.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
21/03/ Working with Controls Text and List Boxes.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
1 Using an Integrated Development Environment. Integrated Development Environments An Integrated Development Environment, or IDE, permits you to edit,
Visual Basic.NET Windows Programming
5.01 Understand Different Types of Programming Errors
ME 142 Engineering Computation I
How to debug an application
Debugging Dwight Deugo
Computer Programming I
Testing Key Revision Points.
Using Visual Studio with C#
Important terms Black-box testing White-box testing Regression testing
DEBUGGING.
Important terms Black-box testing White-box testing Regression testing
5.01 Understand Different Types of Programming Errors
Debuggers.
Test Automation For Web-Based Applications
1. Open Visual Studio 2008.
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Tonga Institute of Higher Education
Our Environment We will exercise on Microsoft Visual C++ v.6
Debugging Visual Basic Programs
Debugging Dwight Deugo
Presentation transcript:

Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables during program execution.

Logic error example If Age > 13 And Age < 20 Then TextBox2.Text = “ You ’ re a teenager ” Else TextBox2.Text = “ You ’ re not a teenager ” End If A teenager is a person who is between 13 and 19 years old

The structure fails to identify the person who is exactly 13

Debug Tool Bar ► ► Break mode gives you a close-up look at your program while the Visual Basic compiler is executing it. Break All Start Stop Step Into Step Out Step Over Run To Cursor Breakpoints Locals Watch1

Breakpoint ► You can set a breakpoint by clicking the gray margin to the left of the line of code shown. Breakpoint Gray margin

Debug Toolbar ► Step Into  You can step through your code line by line.  This includes stepping into any function or procedure that the code calls. ► Step Over  Works in a similar way to Step Into, but you pass straight over the procedures and function

Debug Toolbar ► Step Out  This allows you to jump to the end of the procedure or function that you are currently in  Move to the line of code after the line that called the procedure or function.  This is handy when you step into a long procedure and want to get out of it.

Debug Toolbar ► Run To Cursor  Enable you to place your cursor anywhere in the code following the current breakpoint.  The code between the current breakpoint where the cursor is positioned will be executed  The execution will stop on the line of code where the cursor is located.

Working With Breakpoint ► To view the Data Tip hover the mouse over the variable. ► You can change the contents of the variable by clicking the variable name then change the text box value.

Watch Window ► It is provides a method for you to watch variable and expressions easily while the code is executing. ► You can add and delete only when your program is in break mode. ► It is allow to change the value of a variable.  The text for the value turn to red. ► You need to set a breakpoint before the variable that you want to watch

Watch Window ► Step 2

Watch Window ► Step 3

Local Window ► It is similar to the Watch window. ► It shows all variables and objects for the current function or procedure.