Overhead associated with OutputDebugString in release build

后端 未结 8 1883
有刺的猬
有刺的猬 2020-12-15 05:26

Is there a significant overhead associated with calling OutputDebugString in release build?

8条回答
  •  难免孤独
    2020-12-15 05:48

    Never leave OutputDebugString() calls in a release build. Always either remove them by using #ifdef statements, or provide another switch to have them turned off.

    If you leave them in, have them disabled by default and only activate them on request, because otherwise your app will make it hard to debug other apps which behave nice (i.e., only output debug data on request).

    Theres DebugView to catch the output of apps, but of course that's only good if not every app chatters along for no good reason.

提交回复
热议问题