Tip DebugView 勾选 Captrue Global Win32 C++ 代码 std::wstring debuginfo = L"test"; OutputDebugString(debuginfo.c_str()); 参考 How do I use OutputDebugString with a std::string?