Incorrect PageMode IsDebugging value

Recently I stumbled upon a verified Sitecore bug in Sitecore 8.1 Update-1. When you check (in either MVC or WebForms) the value Sitecore.Context.PageMode.IsDebugging, it is returning false when you’re in Experience Editor with Debugging enabled.

debug-issue (1).JPG

Obviously this isn’t what you’d expect, and Sitecore Support verified they could recreate it. I have yet to hear back on what I assume will be a patch, but it’s very disheartening to see something so. basic. get. missed.

It’s the little things that fire me up sometimes, and this is one of those that makes me question the quality of Sitecore’s testing efforts. Something like this shouldn’t make it to prime time. Come’on Sitecore, improve your regression testing!