简体   繁体   English

当程序在非调试模式下运行时,如何显示控制台窗口?

[英]How do I make the Console window show when a program is running in non-debug mode?

I'm writting this XNA game and in order to help me debug some problems, I'd like to see the output I'm writing to the Console in my code .. Problem is the Console window in Visual Studio 2008 will only show when I run the program in Debug mode .. And in this mode I can see the stuff I'm writing to the console in my code ... However I can't find any way to also force the console to be visible when I'm running the code in non-Debug mode .. 我正在编写此XNA游戏,并且为了帮助我调试一些问题,我想查看在代码中写入控制台的输出。问题是Visual Studio 2008中的“控制台”窗口仅在我在Debug模式下运行程序。在这种模式下,我可以在代码中看到正在写到控制台的内容...但是,我找不到任何方法也可以强制控制台在可见时可见。 m在非调试模式下运行代码。

Any suggestions ? 有什么建议么 ?

Why not just add a Console.ReadLine(); 为什么不只添加Console.ReadLine(); to the section(s) of code that you would like to debug? 您要调试的代码部分?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在非调试模式下(.NET 5)在 output window 中显示消息 - Display a message in the output window when in non-debug mode (.NET 5) 在调试与非调试时,简单添加的结果不同 - Different results from simple addition when in debug vs. non-debug 如何在 forms 应用程序中显示控制台输出/窗口? - How do I show a console output/window in a forms application? 如何在控制台窗口中将字符串设为粗体? - How do I make a string bold in a console window? 如何让Debug.WriteLine在发布模式下写入输出窗口? - How do I get Debug.WriteLine to write to the output window in Release mode? 如何让我的程序显示在应用程序和功能中? - How do I make my program show up in apps and features? 运行进程时如何显示控制台? - How to show console when running a process? GPG加密在控制台调试模式下工作,但在发布模式下不工作(窗口服务) - GPG encryption is working in console debug mode but not in release mode( window service) 如何调试“索引超出范围”异常? 还是可以在引发异常时让VS进入调试模式? - How can I debug an “Index was out of range” exception? Or can I make VS enter debug mode when an exception is thrown? Visual Studio 2012中的C#。如何在64位模式下进行调试? - C# in Visual studio 2012. How do I make it debug in 64 bit mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM