How to debug an application

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

COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Using Macros and Visual Basic for Applications (VBA) with Excel
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Finding and Debugging Errors
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Creating a Console Application with Visual Studio
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Debugging Projects Using C++.NET Click with the mouse button to control the flow of the presentation.
Playing Back Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
Chapter 02 (Part III) Introduction to C++ Programming.
Active-HDL Interfaces Debugging C Code Course 10.
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.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Chapter 2 – Introduction to the Visual Studio .NET IDE
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.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
Chapter 7 What’s Wrong with It? (Syntax and Logic Errors) Clearly Visual Basic: Programming with Visual Basic nd Edition.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
DEVRY CIS 170 C I L AB 1 OF 7 G ETTING S TARTED Check this A+ tutorial guideline at
Dive Into® Visual Basic 2010 Express
Word Lesson 1 Microsoft Word Basics
Excel Tutorial 8 Developing an Excel Application
Chapter 2: The Visual Studio .NET Development Environment
ME 142 Engineering Computation I
PowerPoint Essentials Vocabulary
Working in the Forms Developer Environment
Debugging Dwight Deugo
Chapter 2 – Introduction to the Visual Studio .NET IDE
© 2016, Mike Murach & Associates, Inc.
Computer Programming I
1. Introduction to Visual Basic
How to design a Windows Forms application
Microsoft Windows XP Inside Out Second Edition
Word 2002 Chapter 7 MANIPULATING TABS.
Access Project 8 Using Visual Basic for Applications (VBA) and Creating Multi-Page Forms.
Differences Between Word 2003 to 2007
Using Procedures and Exception Handling
Using Visual Studio with C#
Important terms Black-box testing White-box testing Regression testing
Program and Graphical User Interface Design
DEBUGGING.
Important terms Black-box testing White-box testing Regression testing
Chapter 7 Advanced Form Techniques
CHAPTER FIVE Decision Structures.
Variables and Arithmetic Operations
Debugging with Eclipse
CIS 470 Mobile App Development
Microsoft Office Ribbon
Test Automation For Web-Based Applications
Tonga Institute of Higher Education
Our Environment We will exercise on Microsoft Visual C++ v.6
Debugging Visual Basic Programs
POS 408 Week 1 Individual Assignment Individual: Console Display Message//tutorfortune.com Click on below link to buy
CIS 470 Mobile App Development
Debugging Dwight Deugo
Fundamentals of Using Excel
Debugging with Eclipse
Microsoft Excel 2007 – Level 2
CIS 694/EEC 693 Android Sensor Programming
Presentation transcript:

How to debug an application Murach 015 chapter 11

Objectives Applied Use the debugging techniques presented in this chapter to debug any unhandled exceptions or logical errors in the applications that you develop. Knowledge Describe the differences between the three Step commands that you can use to control the execution of an application. Describe the primary differences between the Autos window, the Locals window, and the Watch window. Describe the use of the Immediate window. Describe the call stack that’s displayed in the Call Stack window. Explain how you can use the Console class to display information in the Output window.

The Options dialog box Debug->Options Default: application continues after exception is thrown

The Exception Settings window Debug->Windows->Exception Settings

The Future Value application in break mode

Four ways to enter break mode Force an unhandled exception to be thrown. Set a breakpoint and run the application. Choose the DebugStep Into command or press F11 to begin debugging at the first line of the application. Choose the DebugBreak All command or press Ctrl+Alt+Break while the application is executing.

The Future Value (Chapter 3) application with a data tip displayed

The Future Value application with a breakpoint

Change Value

How to set and clear breakpoints To set a breakpoint, click or tap in the margin indicator bar to the left of a statement. Or, press the F9 key to set a breakpoint at the insertion point. You can set a breakpoint before you run an application or while the application is in break mode. To remove a breakpoint, use any of the techniques for setting a breakpoint. To remove all breakpoints at once, use the DebugDelete All Breakpoints command (Ctrl-Shift- F9). To disable all breakpoints, use the DebugDisable All Breakpoints command. To enable all breakpoints, use the DebugEnable All Breakpoints command.

Commands in the Debug menu and toolbar

Commands in the Code Editor’s shortcut menu

The Future Value Application with a breakpoint

The Locals window

How to use the Locals window The Locals window displays information about the variables within the current scope. To display the Locals window, click on the Locals tab or use the DebugWindowsLocals command. To change the value of a property or variable, double-click on the value in the Value column, then type a new value and press the Enter key.

How to use the Autos window The Autos window works like the Locals window, but it only displays information about variables used by the current statement and the previous statement. To display the Autos window, you can use the DebugWindowsAutos command.

A Watch window

Watch Window

The Immediate window

The Call Stack window

Stack Window Hierarchy

The Call Hierarchy window with two methods displayed

An Output window that shows debug information

Output Window Command

An Output window that shows build information

An Output window with debugging information

Methods of the Console class that write data to the Output window Write(string) WriteLine(string) Three statements that write data to the Output window Console.WriteLine( "Entering CalculateFutureValue method..."); Console.WriteLine("month: " + (i+1)); Console.WriteLine("futureValue: " + futureValue); Code that uses an if statement to control when data is written if ((i+1)%12 == 0) // every 12 months

The Visualizer menu in the Locals window

The Text Visualizer dialog box