1 / 23

IERG4180 Tutorial 1

IERG4180 Tutorial 1. Jim. Content. About Microsoft Visual Studio About software bugs Debugging tools Assignment Overview. Microsoft Visual Studio (VS). Integrated Development E nvironment (IDE) for windows application Basically consists of source code editor Build automation tool

eros
Download Presentation

IERG4180 Tutorial 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IERG4180 Tutorial 1 Jim

  2. Content • About Microsoft Visual Studio • About software bugs • Debugging tools • Assignment Overview

  3. Microsoft Visual Studio (VS) • Integrated Development Environment (IDE) for windows application • Basically consists of • source code editor • Build automation tool • debugger • Use VS to develop your work in assignment 1 • Can get it from Microsoft DreamSpark(for Students)

  4. How to kill bugs? • Try to minimize the occurrence of bugs • Realize what you have to do first • Divide and conquer • Use meaningful variable name (if possible, follow some naming convention) • Indent appropriately • Make comments whenever you can • These will increase your code’s readability (at least more readable for yourself)

  5. How to kill bugs? • In case bug happens.. • Check the error message, Google it • If no luck, then you need debugger to help you • Of course, printf / cout are still your good friends • Sometimes, Clean and Rebuild function might help

  6. Debugging tools • Start Debugging (F5)

  7. Breakpoint • Program pause for debugging purposes • Instruction breakpoint • interrupt right before a programmer-specified instruction is executed

  8. Breakpoint • Conditional breakpoint • Similar to Instruction breakpoint, but it will only interrupt when a given condition is fulfilled

  9. Tracepoint • a breakpoint that prints a message to the Output window

  10. Tracepoint

  11. Tracepoint

  12. Tracepoint

  13. Autos/ Locals/ Watch • To track the value of the variables

  14. Autos/ Locals/ Watch • To track the value of the variables

  15. Step into • If the line contains a function call, Step Into executes only the call itself, then halts at the first line of code inside the function. Otherwise, Step Into executes the next statement.

  16. Step Over • Similar to Step Into • Use Step Into if you want to look inside the function call. Use Step Over if you want to avoid stepping into functions.

  17. Step Out • Step Out resumes execution of your code until the function returns, then breaks at the return point in the calling function.

  18. Call Stack • list of names of methods called at run time from the beginning of a program until the execution of the current statement • help you understand the program flow

  19. Overview of the assignments • Target: to implement network software product(s) (for sure) • For each assignment you have to deal with a software product • Each product is an “evolution” of the previous one • Details of each assignment will be further explained in later tutorials

  20. Assignment 1 – NetProbe • One application with three modes • Sender • Receiver • HostInfo • It is a console application in Windows Receiver Sender

  21. Assignment 2 – NetProbe version 2 • Two applications: server and client • extend the application in assignment 1 • One Server to deal with multiple Clients • Concurrent server model using multithreading • Your code should be able to compile and run in both Windows and Linux platform • Again, they are console applications, no GUI is required Client 1 Server Client 2 Client 3

  22. Assignment 3 – a simple web server • Support HTTP protocol processing • Server: extends the server in assignment 2 • Client: HTTP Client (e.g. web browser) • Server side can serve HTTP GET requests from the client side • Implement two threading models • On-demand thread creation • Thread-pool models HTTP Client 1 Server HTTP Client 2 HTTP Client 3

  23. Assignment 4 – a low latency web server • Try to make your web server to respond as soon as possible • Details will be confirmed soon

More Related