Software Testing Visual Studio Debugging PDF

Summary

This document provides an overview of software testing using Visual Studio debugging techniques. It covers various debugging concepts, such as breakpoints (conditional, tracepoint, temporary, and dependent), run controls, variables (local and autos), the watch pane, action macros, breakpoint pane, and how to export/import breakpoints. The document is aimed at software developers, especially those working with C-programming.

Full Transcript

Software Testing Visual Studio Debugging Instructor: Kaveh Eshraghian Overview VS Debugger Overview Breakpoints Run Controls Variable Pane Watch Pane The Call Stack Visual Studio Debugger Integrated debugger Benefits:  Convenient  Efficient  Multi-variable...

Software Testing Visual Studio Debugging Instructor: Kaveh Eshraghian Overview VS Debugger Overview Breakpoints Run Controls Variable Pane Watch Pane The Call Stack Visual Studio Debugger Integrated debugger Benefits:  Convenient  Efficient  Multi-variable Tracking Supports  Break points,  Conditional breakpoints,  Stepping,  Stack trace,  Variable display,  Variable watch. Breakpoints Definition:  One of the most important debugging techniques in your developer's toolbox  Can be set on any line of executable code. Benefits:  Examining state of code  Examining state of all variables  Changing variables during runtime  Possibility of taking different paths within code using “Run Controls” Breakpoints Types Conditional breakpoints that are hit, only when a certain condition is met. Tracepoint A breakpoint used to output messages or executing macros. Temporary Break the code only once. Dependent Breaks execution only if another breakpoint is first hit. Breakpoints Types Action Macros $CALLER The name of the function which called this function. $CALLSTACK Displays the call stack showing how this function was called. $FILEPOS The name of the current file and the line of the breakpoint $FUNCTION The name of the function containing the breakpoint $TICK The number of milliseconds since the computer was started In $FUNCTION called from $CALLER: i = {i} Breakpoint Pane Definition:  A toolbox to display the list of all breakpoints within the code in one window. functionalities:  Each breakpoint has a checkmark to the left of it which can be clicked to temporarily disable the breakpoint.  An X button above the list of breakpoints that will delete the highlighted breakpoint.  A New button which can create two different types of breakpoints. Breakpoint Types Same type of breakpoint we have been using all Function along breakpoint Allows typing the name of a function Suspends execution on the first line of function Set to watch for changes in a specified number of Data bytes at a specific address in memory. breakpoint Every time this variable is changed, a breakpoint will be triggered. Run Controls continue to execute until it either hits the next breakpoint or the program completes. stop the current execution of the program and restart it position the cursor on the next statement that is going to be executed terminate the current debugging session resume execution until it enters the next function call. execute the next statement continue to the end of a function and return Variables Pane The Autos and Locals windows show variable. The windows are only available during a debugging session. Autos window:  shows variables used around the current breakpoint. Locals window:  shows variables defined in the local scope Watch Pane Watch variables and expressions. Display several variables at a time while debugging. Observe any valid expression The Call Stack Shows the line paused at and All calls paused before that Point. Exporting and Importing Breakpoints Breakpoints can be exported from the breakpoints pane using the curved arrow buttons at the top of the pane. This lets you create a set of breakpoints to debug a certain problem and save them to an XML file. Since you might not have completely solved the problem, you can save the breakpoints and then reload them if the same problem occurs again.

Use Quizgecko on...
Browser
Browser