如何将 win32 C++ 登录到 Visual Studio 输出窗口? [英] how to log in win32 c++ to the visual studio output window?

查看:24
本文介绍了如何将 win32 C++ 登录到 Visual Studio 输出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 log4net 正在登录到 Visual Studio 输出窗口,但是我可以在 C++ win32 代码中使用哪些代码来执行与调试 C++ 相同的操作,并且似乎根本无法单步执行,并且日志记录将是无论如何在生产中也很有用.我加了

My log4net is logging to the visual studio output windows but what code can I use in the C++ win32 code to do the same as I need to debug the C++ and can't seem to step through it at all and logging would be useful in production as well anyways. I added

wprintf(L"Registering hook handler\n"); 

但这似乎不起作用.好多年没做C++了,更别说win32 C++了.

but that doesn't seem to work. It has been years since I have done C++ as well, let alone win32 C++.

推荐答案

我认为您正在寻找 OutputDebugString().

I think you're looking for OutputDebugString().

这篇关于如何将 win32 C++ 登录到 Visual Studio 输出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆