The Debug window and the associated Debug object are VB’s main built-in
features for debugging your code at design time.
Bugs are a fact of life. Even the most finely honed programming discipline
can’t guarantee error-free code. Because you can’t absolutely prevent
bugs from being written in the first place, you have to settle for second best
by trying to stamp them out before they inadvertently get released into a product.
Fortunately, VB gives you a lot of opportunities to find your bugs before you
put your software into the hands of your users. The primary debugging tools in
the Visual Basic programming environment are the following three debugging windows:
The Watch window
The Immediate window
The Locals window
This chapter covers the following topics:
Bug prevention
Watch expressions, types, and contexts
Break mode
The Immediate window and the Debug object
Interacting with the Immediate window
Locals
When to use the Immediate window in place of breakpoints