MZ-Tools Articles Series: HOWTO: Guessing the IDE mode (design, debug or run-time) from a Visual Studio add-in or macro

When you want to know programatically the IDE mode (design, debug or run-time) it happens that the DTE.Mode property returns only two of the three possible modes (I don’t know why Microsoft omitted the Run Mode in the vsIDEMode enum). In this article I explain how to distinguish among the three modes:

HOWTO: Guessing the IDE mode (design, debug or run-time) from a Visual Studio add-in or macro
http://www.mztools.com/articles/2007/MZ020.htm