Modes in the Macros IDE
When working in the Visual Studio Macros integrated development environment (IDE), the actions you take are determined by the environment's current mode. You create your macro in design mode, execute and debug it in run/debug mode, and step through it using breakpoints in break mode.
To facilitate debugging, the Macros IDE allows you to edit macros while in run/debug mode and design mode. You cannot edit macros while in break mode.
The following table shows the functionality available in design, run/debug, and break modes.
Start Without Debugging
When you run your project from within the Macros IDE, the cursor's location determines which events occur. Running a project outside of a procedure, or when the edit buffer is empty, runs all projects, attaches the debugger, and puts the Macros IDE in run/debug mode. Running a project inside of a procedure runs all projects plus the specific macro, attaches the debugger if it is not already, puts the Macros IDE in run/debug mode, and runs the procedure.
When the Macros IDE stops at a breakpoint in run/debug or break mode, you cannot invoke commands in the host, and messages that could alter its state are suppressed.
When you run your project from within the Macro Explorer, all projects and then the procedure are run. The Macros IDE is not instantiated, nor is the debugger attached. When you stop your project, events are unhooked and the state is lost, and when you restart the project, the events are reconnected.
In the Visual Studio IDE, the Debug menu contains commands that are either disabled or absent from the Debug menu in the Visual Studio Macros IDE. The following table lists all Debug commands and their availability status in the Macros IDE.
Status in Macros IDE
Displays the Breakpoints window
Displays the Immediate window
Puts the IDE in run mode and attaches the debugger
Compiles all code
Starts the program
Start Without Debugging
Starts the program without opening the debugger
Enables you to change the way the debugger handles exceptions or categories of exceptions
Steps into the function at the breakpoint
Steps over the function at the breakpoint
Step Out Of
Steps out of the current function
Displays the New Breakpoint dialog box with the Data and Address tabs removed
Clear All Breakpoints
At least one breakpoint must be set
Combining the Debugger object with the Visual Studio automation model is not advised. If you use the Debugger object in macros intended to automate commands inside the Visual Studio Macros IDE, unexpected results may occur.