Chapter 11: Debugging.

Slides:



Advertisements
Similar presentations
VCE SD Theory Slideshows By Mark Kelly Vceit.com Debugging Techniques.
Advertisements

Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Introducing JavaScript
Code Elements and Processing Coordinate System. Code elements: pages Comments: are documentation notes that are ignored by the computer but are.
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.
History of the Internet By: Rebecca - 5 th Period PIT Class.
2440: 211 Interactive Web Programming JavaScript Fundamentals.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
Microsoft Excel 2003 Illustrated Complete with Excel Programming.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
09/11/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 2 Binary Values and Number Systems.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
Animation Programs Alice. Overview 4-step process for creating animations Step 1: Understand Problem Step 2: Design Step 3: Implementation Step 4: Test.
History of Computers & the Internet Emily 5th. Creation of Computers Invented in 1936 Konrad Zuse Z1-First freely programmable computer.
Creating a Console Application with Visual Studio
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
The first computer was invented in By Konrad Zuse. It was called the Z1. Unfortunately Zuse died in 1995.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
General Programming Introduction to Computing Science and Programming I.
HOMEWORK REVIEW This is an if else statement layout if (condition) { code to be executed if condition is true; } else { code to be executed if condition.
Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Chapter 22 Developer testing Peter J. Lane. Testing can be difficult for developers to follow  Testing’s goal runs counter to the goals of the other.
Debugging Strategies from Software Carpentry. Agan's Rules Many people make debugging harder than it needs to be by: Using inadequate tools Not going.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Java Programming: From Problem Analysis to Program Design, 5e Chapter 2 Basic Elements of Java.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
Preparing for Assignment 3. Setup Assignment 3 builds on Assignment 2, and we are using the same basic scenario. Save the spreadsheet you used for Assignment.
JavaScript Tutorial 1 - Introduction to JavaScript1 Tutorial 1 Introduction to JavaScript Section A – Programming, HTML, and JavaScript.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
Page 1 – Autumn 2009Steffen Vissing Andersen SDJ I1, Autumn 2009 Agenda: Java API Documentation Code Documenting (in javadoc format) Debugging.
Testing and Debugging. Testing Fundamentals  Test as you develop Easier to find bugs early rather than later Prototyping helps identify problems early.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 7.1 The Leaning Tower of.
Debugging What coders (programmers) do to find the errors (“bugs”) in their own programs “Bugs” – Admiral Grace Hopper, developer of the world’s first.
PHP (cont.). 2 Functions Definition – function name(arguments){... } –syntax name as for a variable, but without $ arguments as for variables –to return.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. Chapter 2 C++ Basics.
Debugging Watch and Text Output Alice. Debugging Techniques Several techniques are helpful in eliminating errors (bugs) in programs: careful design incremental.
© Steven Vidler/Corbis 1 Web Search/Thinkin g What is computer science? What do people who work in this field do? 2 Video Search/Thinkin g Why.
Bugs CS100 how to prevent them, how to find them and how to terminate them.
1 CSE1301 Computer Programming: Lecture 16 Flow Diagrams and Debugging.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Lecture 9 Debugging R code Trevor A. Branch FISH 553 Advanced R School of Aquatic and Fishery Sciences University of Washington.
Harvard Mark I Howard Aiken was a pioneer in computing and a creator of conceptual design for IBM in the 1940s. He envisioned an electro-mechanical computing.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Web Database Programming Using PHP
Wrapper Classes Debugging Interlude 1
Introduction to Computing Science and Programming I
Chapter 2: The Visual Studio .NET Development Environment
ME 142 Engineering Computation I
How to debug an application
Web Database Programming Using PHP
Lesson 2 Understanding Software Bugs
Debugging with Eclipse
Code Elements and Processing Coordinate System
Creating an Animation Program
Debugging 9/22/15 & 9/23/15 Imagine! Java: Programming Concepts in Context by Frank M. Carrano, (c) Pearson Education - Prentice Hall, 2010.
Fundamentals of Programming
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Tonga Institute of Higher Education
Code Elements and Processing Coordinate System
Debugging “Why you were up till 2AM”
Visuals for Class 5 ChE 310 NFR.
Introduction to Computer Science
The Reading Process.
L L Line CSE 420 Computer Games Lecture #4 Working with Data.
Presentation transcript:

Chapter 11: Debugging

Definition Debugging is the process of identifying and removing errors from programs.  

“It’s not the computer. Maybe It’s you. “

Overview Purpose of chapter is to examine basic strategies for fixing bugs. The term debugging attributed to Admiral Grace Hopper in the 1940s. While working on a Mark II Computer at Harvard, her associates discovered a moth stuck in the computer and thereby impeding operation, whereupon she remarked that they were "debugging" the system. Typical types of bugs include variables not initialized, typos, non-existent array elements, etc.

Tip 1 Take a break This is a serious strategy, and scientifically based.

Get someone else involved Tip 2 Get someone else involved Not just for a new set of eyes, but you should explain the program to them step by step. Programming buddies. What do you look for in a coding buddy? Should you aim to be the one with the least knowledge?

Simplify Tip 3 What are some of the ways that you simplify? Incremental development to break up in manageable pieces. Comment out . Note that having OOP can help because it allows easier isolation. New sketch with just one of the classes. You’ll have less bells and whistles to work with

Tip 4 println() You have been using this from the start. The text appears in the console. It prints while the program is executing. Remember that you can concatenate or join text and variables. printArray() is also good because it will nicely format array contents and show the values along with index.

Tip 5 Debugging tool A new feature in version 3. It can be turned on from toolbar or from menu. You can pause program by specifying a break point. Then you can continue or go step by step.