Advanced Placement Computer
Science AB:
Assignment 25: Debugging
Fundamentals
Sewickley Academy,
2000-2001
See Course
Home Page.
| Date Assigned: |
Thu Dec-7 |
| Date Due: |
Mon Dec-11 |
0. Note: There is a quiz on Monday on debugging. You
will be expected to know the key bindings of the different debugging functions
(eg: what does Shift-F11 do?), as well as (more important, of course)
what they do and when and how you would use them.
1. Do IntroCS
Assignment 25.
Reminder: Debugging Techniques Which May Appear on a Pop Quiz
Later This Week
From a previous assignment: learn how to use the debugger.
Do this by stepping through code you have already written. Intro
CS students are responsible for the following (and yes, you must know these
by their F-keys (meaning, you must simply know what Shift-F11 does, for
example), and yes, you may be quizzed on this as soon as tomorrow):
-
Variables window (how to view and *set* Auto and Locals)
-
Watch window (for example, how to evaluate v.length() in the debugger)
-
Call Stack window (how to move up and down the call stack)
-
How to start a program or continue running from a user breakpoint (F5)
-
How to set and clear breakpoints (F9)
-
How to step into (F11), and why you would do so
-
How to step over (F10), and why you would do so
-
How to step out of (Shift-F11), and why you would do so
-
How to run to cursor (Ctrl-F10), and why you would do so
-
How to set next statement (rightclick on statement), and why you would
do so
Finally, Intro CS students are responsible for understanding basic debugging
techniques, such as:
-
Boundary case analysis (which inputs you should test your program on)
-
Commenting out working code to home in on the bug
-
Using assert statements
As for AP CS students, you must know all of the above, *plus* you are responsible
for:
-
The Memory window (viewing and modifying memory segments)
-
The *this* tab of the Variables window (the "m_" variables when in class
methods)
Both IntroCS and AP CS will cover more advanced debugging techniques later
in the year, but this is enough to get you started. Remember: use
the debugger early and often. It can save you *enormous* amounts
of time.
Carpe diem.
DK
See Course
Home Page.