Connecting Tech Pros Worldwide Forums | Help | Site Map

Debugging in VBA - 1) Overview

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,727
#1   May 18 '07
Table of Contents - [Debugging in VBA]
Next Chapter - [Debugging in VBA - 2A) The Code Pane (F7)]
-----------------------------------------------------------------------------------------------
1) Overview.
There are some very important sub-windows (panes) within the debugger and I'll introduce you briefly to some of these first.
  1. The Code Pane (F7).
    This is the main pane and doesn't have a title.
    From here you can do all sorts of things with the code, including editing it. We'll cover some of the other things in more detail later on. Marked as {A} in attached screenshot.
  2. The Project Explorer Pane (Ctrl-R).
    This lists the hierarchy of objects that can contain code. Ultimately, they all drop from the overall project. Double-click on any object to open the code for that object in the Code Pane. Marked as {B} in attached screenshot.
  3. The Properties Pane (F4).
    Like any Properties Pane this shows all the properties for the selected object (within the Project Pane). Marked as {C} in attached screenshot.
  4. The Immediate Pane (Ctrl-G).
    This enables both displaying of Debug information as well as executing 'on the fly' code. Marked as {D} in attached screenshot.
  5. The Object Browser Pane (F2).
    This displays to the developer (you) what objects or properties contain, and/or are contained by, which other objects (or properties).
  6. The Locals Pane.
    This shows all the local variables, including their current contents.
  7. The Watch Pane.
    This allows you to view various variables and/or objects/properties as the code progresses. This can also be used to show results of calculations and even to cause the code to stop when certain conditions are met.

I will try to get some picture attachments posted to illustrate some of these panes, but they are rarely all on screen at once, and they can be placed in pretty well any position within the main VBA window anyway.
Attached Thumbnails
vbadebugger.jpg  



Reply