如何在PC上调试Xna 4.0游戏

发布于 2024-09-28 18:33:13 字数 296 浏览 0 评论 0原文

我对 Windows 上的 Xna 4.0 游戏开发非常陌生,发现很难在 VS 2010 中调试。我真的很想在运行游戏时看到我的变量值。有什么办法可以调试吗?我将 视为调试插件。但是,我不确定这是否适用于 VS 2010。是否有任何其他加载项或任何解决方法?我正在 Windows 7 上工作。感谢您的帮助。

I am very new to Xna 4.0 game development on Windows and finding it hard to debug in VS 2010. I really want to see my variable values while I am running the game. Is there any way you can debug? I see this as a debugging add-in. However, I am not sure If that would work with VS 2010. Is there any other add-in or any workaround? I am working on Windows 7. thanks for the help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甲如呢乙后呢 2024-10-05 18:33:13

您可以只在屏幕上绘制您想要看到的变量。查看此链接:

http://msdn.microsoft.com /en-us/library/bb447673(XNAGameStudio.10).aspx

You could just draw the variables you want to see on the screen. Check out this link:

http://msdn.microsoft.com/en-us/library/bb447673(XNAGameStudio.10).aspx

伴梦长久 2024-10-05 18:33:13

这与XNA无关。当应用程序运行时,您在 VS2010 中看不到任何变量值。 VS 如何知道要显示哪些变量?

出于调试目的,您可以在代码中使用 Debug.Writeline 在运行时将变量的值写入控制台。这样您就可以跟踪您选择的变量的值。

This has nothing to do with XNA. You can't see any variable values in VS2010 while the application is running. How would VS know, what variables to display?

For debugging purposes you can use Debug.Writeline in your code to write the value of the variable to the Console while running. That way you can track values of variables of your choice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文