ATL Debug Flags

You can manually set these flags, which will cause lots of debug spewage.

Flag Effect
_ATL_DEBUG_QI Log QueryInterface calls
_ATL_DEBUG_INTERFACES Log AddRef and Release calls

References

Debugging Tips (ATL) | Microsoft Learn