在单机游戏中进行调试 [英] Debugging in monogame

查看:65
本文介绍了在单机游戏中进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Monogame中打印或输出文本?

How do you print or output text in Monogame?

我用谷歌搜索了如何在单人游戏中显示文字,并被引至: Debug.WriteLine

I googled how to display text in monogame and was led to this: Debug.WriteLine

其中说:默认情况下,输出将写入

Which says: "By default, the output is written to an instance of DefaultTraceListener."(and that page just confused me more).

因此,如果有人可以将我引导到一种显示DefaultTraceListener的方法,或者在单机游戏中输出文本的另一种方法,我将不胜感激.

So, if someone could direct me to a method of displaying DefaultTraceListener, or another method of outputting text in monogame, I would appreciate it.

推荐答案

我找到了!

使用Debug.WriteLine写入调试器,该调试器位于Visual Studio的输出窗口中(默认情况下位于底部).默认情况下,在OpenGL项目中关闭程序(按F5键启动,按Esc键关闭)时会出现.

Using Debug.WriteLine writes to the debugger, which is in the output window in Visual Studio(by default at the bottom). It appears when you close the program(press F5 to start, Esc to close) by default in an OpenGL project.

这篇关于在单机游戏中进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆