Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/124.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Outputdebugstring,printf不工作(Visual studio 2012,Windows 8)_C++_Debugging_Window - Fatal编程技术网

C++ Outputdebugstring,printf不工作(Visual studio 2012,Windows 8)

C++ Outputdebugstring,printf不工作(Visual studio 2012,Windows 8),c++,debugging,window,C++,Debugging,Window,我正在Windows 8上使用Visual studio 2012 我通常使用OutputDebugString进行日志记录,但最近它不起作用 我也重新安装了VisualStudio,但还是一样的 现在我只能用fprintf做日志记录了!!真的很痛 有人能解决这个问题吗 --我的代码-- #包括 #包括 int main() { OutputDebugString(L“hello world”); printf(“hello world\n”); 返回0; } 我现在做了一个新项目, 该项目的

我正在Windows 8上使用Visual studio 2012

我通常使用OutputDebugString进行日志记录,但最近它不起作用

我也重新安装了VisualStudio,但还是一样的

现在我只能用fprintf做日志记录了!!真的很痛

有人能解决这个问题吗

--我的代码--

#包括
#包括
int main()
{
OutputDebugString(L“hello world”);
printf(“hello world\n”);
返回0;
}
我现在做了一个新项目, 该项目的printf运行良好。但是OutputDebugString仍然不起作用


还有我的cocos2dx项目(是的,我正在研究cocos2dx),它的printf和OutputDebugString都不起作用

确保您的系统调试打印过滤器设置为允许所有消息,通常通过将注册表值
HKEY\U LOCAL\U MACHINE\system\CurrentControlSet\Control\Session Manager\debug print filter
设置为DWORD 0xFFFF来完成


有关更多信息,请参阅。

请发布代码以显示您的意思谢谢您的关注!我上传了我的代码。你看到
Debug
窗口的输出了吗?当然。我在visual studio中看到了许多窗口。不。。。。会话管理器注册表中没有值lkie Debug Print Filter…我认为默认情况下它不存在,但您可以创建它。没有为我做任何事情
#include <stdio.h>
#include <Windows.h>

int main()
{
    OutputDebugString( L"hello world" );
    printf("hello world\n");

    return 0;
}