1 Session-4 CSIT 121 Spring 2006 Debugging Tips Lab Work.

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

CS 450 MPX P ROJECT Introduction to Turbo C. W HY USE T URBO C? Many ANSI C compilers are available for free, however they lack certain features that.
1 CSCI N305 C Language Programming Welcome to CSCI N305! Compiling Your First Program Using Microsoft Visual Studio 2008.
1 Lab Session-II CSIT 121 Fall 2000 Visual Studio Introduction Lab-1 Explanation and Demos Debugging Tips How to add new files to your projects How many.
1 Lab-1 CSIT-121 Spring 2005 Lab Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming Exercise.
E.1 Eclipse. e.2 Installing Eclipse Download the eclipse.installation.exe from the course web site to your computer and execute it. Keep the destination.
1 Session-I & II CSIT-121 Spring 2006 Session Targets Introducing the VC++.NET Solving problems on computer Programming in C++ Writing and Running Programs.
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 Lab Session-I (A and B) CS-120 Fall 2000 Using Windows Using An Editor Using Visual C++ Using Compiler Writing and Running Programs Lab-1 DUE Fri September.
1 Lab Session-I CSIT120 Spring2001 Using Windows Using An Editor Using Visual C++ Using Compiler Writing and Running Programs Lab-1 continues (Session.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Lab-1 CSIT-121 Fall 2004 Lab Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming Exercise.
1 Gentle Introduction to Programming Tirgul 2: Scala “hands on” in the lab.
1 Session-13 CSIT 121 Spring 2006 Test-1 is on March 9 th ; Demo-5 due date extended to March 7 Test-1 is on March 9 th ; Demo-5 due date extended to.
JavaScript Development Tools Front-End Development.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Debugging applications, using properties Jim Warren – COMPSCI 280 S Enterprise Software Development.
Welcome to the Power of 64-bit Computing …now available on your desktop! © 1998, 1999 Compaq Computer Corporation.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
Keith Elder Microsoft MVP
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
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.
Active-HDL Interfaces Debugging C Code Course 10.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Programming with Visual C++ A short review of the process.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
CSE 232: C++ Programming in Visual Studio Graphical Development Environments for C++ Eclipse –Widely available open-source debugging environment Available.
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Programming with Visual Studio.NET A short review of the process.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
Lab00-Getting Started with VC Launch VS 2005 Launch Visual Studio 2005 – Start > All Programs > Microsoft Visual Studio 2005 > Microsoft Visual.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Introduction to Eclipse Programming with an Integrated Development Environment.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Debug in Visual Studio Windows Development Fundamentals LESSON 2.5A.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
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,
DEVRY CIS 170 C I L AB 1 OF 7 G ETTING S TARTED Check this A+ tutorial guideline at
Chapter 2: The Visual Studio .NET Development Environment
How to debug an application
DEBUGGING.
CIS 470 Mobile App Development
1. Open Visual Studio 2008.
ms vısual studıo 2008-Introductıon TUTORIAL
Welcome to Intro to C/C++ CISC 192
Our Environment We will exercise on Microsoft Visual C++ v.6
Double click Microsoft Visual Studio 2010 on the Computer Desktop
Debugging Visual Basic Programs
POS 408 Week 1 Individual Assignment Individual: Console Display Message//tutorfortune.com Click on below link to buy
Creating the First Program
CIS 470 Mobile App Development
jGRASP editor-syncrasies (idiosyncrasies)
Welcome to Intro to C/C++ CISC 192
IS 135 Business Programming
CIS 694/EEC 693 Android Sensor Programming
ECE 3567 Microcontrollers Lab
Presentation transcript:

1 Session-4 CSIT 121 Spring 2006 Debugging Tips Lab Work

2 Some Aspects of Visual Studio Your project can be set in “Debug” or “Release” configuration ( Build->Configuration Manager ) In “Debug” state, you can apply several debugging options. Debug is set by default You can start debugging by invoking the debugger

3 Debugging Tips Let us try a few simple steps Open a new Win32 console project and copy and paste the following program into the editor window The compiler gives an error message Click on the error message The system moves the pointer to the line where the error is, press F1 to learn more

4 Program With an Error #include using namespace std; void main() { double kpl,mpg, kpg; const double CF=1.6; cout<<"How many miles does your car cover in one gallon (MPG rating from the sticker)?"; cin>>mpg kpg = mpg*CF; cout<<"Your KPG rating is "<<kpg<<endl; kpl = kpg/3.78; cout<<"Your KPL rating is "<<kpl<<endl; }

5 Starting the Debugger Once you have compiled the project, you can start the debugger by first inserting breakpoints A Breakpoint is where the program execution will halt Thus you can see the values of variables at that point

6 Using the Debugger Inserting breakpoints is a convenient way of stopping at a suspected problem location and examining the values of variables (Click the gray panel to the left of the program to insert a breakpoint) Click on “Debug”  “Start” Look at the bottom of the screen. You will find “Autos” on the left and call stack on the right “Autos” represents the variables. Look at the values. Which one is not assigned a value yet? Choose “step over” from the icons to avoid stepping into system functions

7 Directories Choose Tools  Options  Environment and change the project directory You can browse the Buildlog.htm file in the Debug folder to appreciate the automation of the linker

8 Lab Work (Part-D Due 2/2) Part-A –Solve Prelab assignment on pages of the lab course textbook. (Exercises 1,2,3,4,5) –Check the solution and make any corrections –The program source code is on the course website in the labs and lectures page Part-B –Carry out all the four exercises in lesson 2-2 on page 34 Part-C –Do exercises 1,2,3 in Lesson 2-3 (page 35) Part-D –Exercise 1 and 2 of Lesson 2-4 are due Thursday Feb 2