在 Visual Studio 中,右键单击“解决方案资源管理器”中的项目。然后单击“属性”并在“应用程序”选项卡中选择“控制台应用程序”作为输出类型。
不要忘记将其更改回“Windows 应用程序”,以便在完成调试后禁用控制台。
Enable the console.
In Visual Studio right-click your project in Solution Explorer. Then click on "Properties" and in the "Application" tab select "Console Application" as your Output-Type.
Don't forget to change it back to "Windows Application" in order to disable the console when you are done debugging.
You might want to take a look at our toolset Gearset. It is a set of tools that can help you with that. It has a dedicated window that shows you a pretty view of the output, organized by color, and provides filtering which can become quite useful when there's a lot of output.
Gearset also provides you with other tools like curve editing and real-time inspection of your objects. There's a free version and a paid version (the difference being a single feature which is unavailable in the free version). Hope it helps.
发布评论
评论(5)
启用控制台。
在 Visual Studio 中,右键单击“解决方案资源管理器”中的项目。然后单击“属性”并在“应用程序”选项卡中选择“控制台应用程序”作为输出类型。
不要忘记将其更改回“Windows 应用程序”,以便在完成调试后禁用控制台。
Enable the console.
In Visual Studio right-click your project in Solution Explorer. Then click on "Properties" and in the "Application" tab select "Console Application" as your Output-Type.
Don't forget to change it back to "Windows Application" in order to disable the console when you are done debugging.
您见过 System.Diagnostics 命名空间中的 Debug 类吗?可以将输出发送到 VS 中的调试控制台(或外部控制台,如 DebugView)
have you seen the Debug class in the System.Diagnostics namespace? That can send output to the debug console in VS (or an external one like DebugView)
对于绘制文本,有方法 spritebatch.DrawString(....) 这就是我绘制 fps 计数的方法。
For drawing text there is method spritebatch.DrawString(....) this is how i draw fps count.
您可能想看看我们的工具集 Gearset。这是一组可以帮助您实现这一目标的工具。它有一个专用窗口,可以向您显示按颜色组织的漂亮输出视图,并提供过滤功能,当有大量输出时,过滤功能会变得非常有用。
Gearset 还为您提供其他工具,例如曲线编辑和对象的实时检查。有免费版本和付费版本(区别在于免费版本不提供单个功能)。希望有帮助。
You might want to take a look at our toolset Gearset. It is a set of tools that can help you with that. It has a dedicated window that shows you a pretty view of the output, organized by color, and provides filtering which can become quite useful when there's a lot of output.
Gearset also provides you with other tools like curve editing and real-time inspection of your objects. There's a free version and a paid version (the difference being a single feature which is unavailable in the free version). Hope it helps.
您始终可以使用 Debug.WriteLine 并读取调试消息窗口。或者使用跟踪点。
You can always use
Debug.WriteLine
and read your Debug messages window. Or use the tracepoints.