It's hard to debug dll files, particularly at loading time in concurrent environment when you can't attach debugger easily. This is a helpful macro that I used to achieve that. It is safe to use, because it is defined as empty in release build. If some call accidentally stays in the code, the release build will not output anything to any file, as it is defined as empty in release. This particular implementation obviously works on Windows only.