Visual Studio 2008 Enum Bit Flags Visualization

I’ve recently discovered a new nice feature in the natice debugger of Visual Studio 2008: the visualization of bit flags.

Let’s take this enumeration for example. Notice that each constant is basically a bit flag.

If we used those bitfields like this:

The debugger shows them like this:

Bit fields visualization in debugger.

However, if the constants are not bit flags, they are not shown. If you declare the enum like this:

you won’t get that in the debugger.

1 Reply to “Visual Studio 2008 Enum Bit Flags Visualization”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.