is this a bug in pxpreprocessor.h?

#if !(defined NDEBUG ^ defined _DEBUG)
#error Exactly one of NDEBUG and _DEBUG needs to be defined by preprocessor
#endif

The #error is thrown even if NDEBUG is defined and _DEBUG is not.

No bug. A quirk in the way preprocessor definitions are inherited from various sources in Visual Studio forced a #define _DEBUG from out of nowhere.