![](/img/trans.png)
[英]How can I find out the base address of a debuggee process in Visual Studio C++ debugger?
[英]Visual C++ - Find out if started by debugger
我想用
AllocConsole();
要么
AttachConsole(ATTACH_PARENT_PROCESS);
取决于程序是否在Visual Studio中运行。 AttachConsole不会将输出打印到任何窗口,例如“输出”。 因此,我想改用AllocConsole,以便至少获得一个控制台窗口。
我找到了针对C#的解决方案,但未找到未使用.NET的C ++解决方案。
感谢您的回答。 除了记录文件以外,我也希望通过其他方式记录程序内容:-)
凯
如果要记录“东西”,以便它在调试器中可见(如果存在),则可能要使用OutputDebugString
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.