Share via


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.

Command

Design Mode

Run/Debug Mode

Break Mode

Start (F5)

Enabled

Enabled

Continue

Start Without Debugging

Enabled

Removed

Removed

Stop/Reset

Disabled

Enabled

Enabled

Detach

Removed

Enabled

Enabled

Attach

Enabled

Removed

Removed

Running Projects from the Macros IDE

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.

Running Projects from the Macro Explorer

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.

Debug Menu Command Differences

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.

Menu Command

Status in Macros IDE

Shortcut Key

Comments

Windows,Breakpoints

Enabled

Ctrl+Alt+B

Displays the Breakpoints window

Windows,Immediate

Enabled

Ctrl+Alt+I

Displays the Immediate window

Enable Debugging

Enabled

Ctrl+Shift+E

Puts the IDE in run mode and attaches the debugger

Build

Enabled

Ctrl+Shift+B

Compiles all code

Start

Enabled

F5

Starts the program

Start Without Debugging

Enabled

Ctrl+F5

Starts the program without opening the debugger

Exceptions

Enabled

Ctrl+Alt+E

Enables you to change the way the debugger handles exceptions or categories of exceptions

Step Into

Enabled

F11

Steps into the function at the breakpoint

Step Over

Enabled

F10

Steps over the function at the breakpoint

Step Out Of

Enabled

Shift+F11

Steps out of the current function

New Breakpoint

Enabled

Ctrl+B

Displays the New Breakpoint dialog box with the Data and Address tabs removed

Clear All Breakpoints

Enabled

Ctrl+Shift+F9

At least one breakpoint must be set

Note

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.

See Also

Tasks

How to: Record Macros

How to: Edit and Programmatically Create Macros

Concepts

Debugging Macros

Macro Recording and Running Issues

Extensibility Model Differences (Macros IDE)