Debugger By: Engr. Faisal ur Rehman CE-105 Spring 2007.

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Debugging Techniques1. 2 Introduction Bugs How to debug Using of debugger provided by the IDE Exception Handling Techniques.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Lec6 P 1 CP2030 Visual Basic For C++ programmers Copyright © University of Wolverhampton CP2030 VBFC Lecture 6 Back To Index v Procedures and Parameters.
Finding and Debugging Errors
How to Debug VB .NET Code.
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
DEBUGGERS For CS302 Data Structures Course Slides prepared by TALHA OZ (most of the text is from
Visual Basic Chapter 1 Mr. Wangler.
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.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
ME 142 Engineering Computation I Debugging Techniques.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
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.
Testing and Debugging Session 9 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
How QuickTest Works with Objects USINGQTP65-STUDENT-01A.
Debug in Visual Studio Windows Development Fundamentals LESSON 2.5A.
5.01 Understand Different Types of Programming Errors
CSC 1201 LAB RULES Nouf Aljaffan (C) CSC 1201 Course at KSU.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
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.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
IDE Walkthrough By: Engr. Faisal ur Rehman CE-105-Spring 2007.
FOP: While Loops.
Error Analysis Logic Errors.
Visual Basic.NET Windows Programming
SDI & MDI SDI -> Single Document Interface
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Chapter 2: The Visual Studio .NET Development Environment
5.01 Understand Different Types of Programming Errors
VBA - Excel VBA is Visual Basic for Applications
ME 142 Engineering Computation I
ECE Application Programming
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Debugging Dwight Deugo
Testing and Debugging.
Computer Programming I
Loop Structures.
1. Introduction to Visual Basic
CE-105 Spring 2007 Engr. Faisal ur Rehman
Microsoft Access 2003 Illustrated Complete
Microsoft Access Illustrated
Important terms Black-box testing White-box testing Regression testing
Chapter 2 Visual Basic Interface
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Important terms Black-box testing White-box testing Regression testing
Computer Programming.
5.01 Understand Different Types of Programming Errors
Problem Solving Techniques
Social Media And Global Computing Introduction to Visual Studio
Understanding the Visual IDE
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Tonga Institute of Higher Education
Using a Debugger 1-Jan-19.
Testing, debugging, and using support libraries
Debugging Visual Basic Programs
Debugging Dwight Deugo
How to debug a website using IE F12 tools
Review of Previous Lesson
Workshop for Programming And Systems Management Teachers
Presentation transcript:

Debugger By: Engr. Faisal ur Rehman CE-105 Spring 2007

Types of Errors 1.Compilation Errors 2.Run Time Errors 3.Logic Errors In MSDN, write: “Know Your Bugs: Three Kinds of Programming Errors”

Compiler Error Compilation errors, also known as compiler errors, are errors that prevent your program from running. If the Visual Basic compiler comes across code that it does not understand, it issues a compiler error.

Run-Time Errors Run-time errors are errors that occur while your program runs. These typically occur when your program attempts an operation that is impossible to carry out. An example of this is division by zero. Suppose you had the following statement: Speed = Miles / Hours –(Error occurs when Hours = 0)

Logical Errors Logic errors are errors that prevent your program from doing what you intended it to do. Your code may compile and run without error, but the result of an operation may produce a result that you did not expect.

Bugs Errors are fixed through debugging No matter how carefully you design a program or write code, errors are bound to happen. Sometimes errors keep the program from even starting, sometimes they cause the program to stop running or crash, and other times, the program may run but not give the expected results.

Bugs Of course, when errors do occur, you will want to find them and fix them. Errors in a program are commonly known as bugs, and the process of finding them and fixing them is known as debugging. The process of debugging is iterative—that is, it is a process you will repeat over and over again. Typically you will write some code, run the program until an error occurs, find the bug, fix it, and then run the program again.

Bugs In most cases, you do not need to stop the program to fix it. You can fix the code where the error occurred and keep running the program where you left off; this process is called Edit and Continue. Debugging is done in the Visual Basic IDE (integrated development environment)—which contains several special commands and windows to help you find bugs. You will learn more about these in the following lessons.

Debugging Tools Debug Window (Debug.Write ( )) Error List (Show Errors in List) Add Watch (Expression is Added in Watch Window For Evaluation) Quick Watch (Quickly Evaluate Expression) Step Into Step Over Step Out Break Point (Causes a Program to bring into Break Mode)

Best Practice Use of Debug Statement.i.e., Debug.WriteLine() Use of msgbox Step Into (F8) and Step Over (Shift + F8) MSDN Procedure should not exceed dozen line Check Procedure for bugs before Writing another one Divide Your program in small projects

Q&A

Write types of bugs Tools for debugging Best practices for debugging Use of Debug Window

MDI Forms

Multiple Document interface Parent Form containing Child Forms is called MDI Form. Made by setting form property: IsMdiContainer = True

MDI Forms In MSDN, write: “Walkthrough: Creating an MDI Form with Menu Merging and ToolStrip Controls” “ Multiple-Document Interface (MDI) Applications” MDI form uses MenuStrip Tool

Modules Modules are code page without interface These are used to: Write generic and reusable sub -procedures and function On Project, Right Click > Add Module Module must contain form or control independent code so that it can be added to other projects

Modules Module works with console applications as well as windows application

Q & A

Define: –MDI Form –Parent Form –Child Form –MenuStrip Tool –Module –Uses of Module –Best Practice for Module