diff options
| author | Morgan Cyrus <[email protected]> | 2022-10-06 22:54:17 -0700 |
|---|---|---|
| committer | Morgan Cyrus <[email protected]> | 2022-10-06 22:54:17 -0700 |
| commit | cea7c7e6beedad8a31f14e1b82416ade6bc52541 (patch) | |
| tree | 70c950d020d568f3f9e2409034af84dbd82e03a6 /Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | |
| parent | step into testing (diff) | |
| download | cst116-ch5-debugging-cyrus-cea7c7e6beedad8a31f14e1b82416ade6bc52541.tar.xz cst116-ch5-debugging-cyrus-cea7c7e6beedad8a31f14e1b82416ade6bc52541.zip | |
Debugging issues.
Diffstat (limited to 'Ch 5 Debugging Project/Ch 5 Debugging Project.cpp')
| -rw-r--r-- | Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp index 7f5dfed..0147ef8 100644 --- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp +++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp @@ -27,20 +27,34 @@ * done
* 6) What happened? Where are we now? What is all of this nasty
* looking code?
-* We are on line 84. the value of 'money' is about to be printed (123.449997 is the assigned value, though it will print 123.45)
+* We are on line 84. the value of 'money' is about to be printed (123.449997 is the assigned value, though it will print 123.45).
+* That said, I don't see any assembly code displayed.
+*
* 7) Remember, stepping into a predefined routine takes you to the
* code for that routine. If the debugger can't find the code it
* will show the assembly code for that routine.
* done, though I did not see the assembly code pop up anywhere.
+*
* 8) How do we get out of this mess? Use the "Step Out" tool.
+* done, though upon selecting the step out tool (Shift + F11) the code appears to finish running at this point.
* 9) In Visual Studio you will be taken back to the same cout
* statement. Use the Step Over tool to take you to the next
* line.
+* done
* 10) Step over the next cout statement. Now look at the console
* window. What was printed?
+* The following was printed:
+*
+* You have $123.45
+* Enter percent raise:
+*
+* This isn't exactly what I expected though..
* 11) Select Stop Debugging either from the Debug menu or from your
* toolbar.
-*
+*done
+*/
+
+/*
* Debugging Exercise 2
*
* 1) With the program stopped, run to Breakpoint 1 by selecting
@@ -56,8 +70,9 @@ * red. This designates that the variable just changed its value.
* 9) What happened to our money? I thought a raise was supposed
* to increase our money? Stop debugging and fix the calculation.
-*
-* Debugging Exercise 3
+*/
+
+/* Debugging Exercise 3
*
* 1) Choose Disable All Breakpoints from the Debug menu.
* 2) With the cursor on the calculation, Run to Cursor. Remember
|