2006/04/12

Visual Studio - Command Window vs. Immediate Window

While debugging in Visual Studio, I often use Command Window to check values of variables (?mySqlStr), assign values to variables (mySqlStr = "SELECT FOO_ID FROM dbo.FOO") or execute short code snippets (myDS.Fill()).

Today I closed Command Window and re-opened it after a while. And I could no longer evaluate any expressions. I also noticed a > prompt that I've never seen before.

It turns out that Command Window has two different modes (clicky):
  • Command mode - used for executing Visual Studio Commands directly in the IDE, bypassing the menu system, or for executing commands that do not appear in any menu,
  • Immediate mode - used for debugging purposes, evaluating expressions, executing statements, printing variable values, and so forth.
Command mode (notice the prompt)


Switching from Command mode to Immediate mode (type immed and press Enter)

Command Window - Immediate mode (no prompt)

No comments:

Post a Comment