调试 ->窗口 ->Unity 项目的内存? [英] Debug -> Windows -> Memory for a Unity project?

查看:63
本文介绍了调试 ->窗口 ->Unity 项目的内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在调试时检查 Unity 项目的内存内容.

无论我怎么尝试,比如使用托管兼容模式,内存窗口都会拼命显示:

无法计算表达式.

问题:

是否可以使用 Unity 项目的内存窗口检查内存?

解决方案

调试->窗口 ->Unity 项目的内存?

其实,在unity工程中,内存窗口无法自动捕捉托管代码,应该使用Watch窗口获取变量的地址,然后在Memory Window 获取它.

建议

首先,请从

2) 然后复制内存窗口中的地址,就可以看到关于它的内存内容了:

除此之外,您还可以尝试使用 Unity Profiler 正如Lotan推荐观看记忆内容一样.

I need to inspect memory content for a Unity project while debugging it.

No matter what I try, such as Use managed compatibility mode, the Memory window desperately shows:

Unable to evaluate the expression.

Question:

Is it possible at all to inspect memory using the Memory window for a Unity project?

解决方案

Debug -> Windows -> Memory for a Unity project?

Actually, in unity project,memory window cannot catch managed code automatically, you should use Watch Window to get the address of the variable and then input the address on Memory Window to get it.

Suggestion

First of all, please enable these options from this document.

1) set a breakpoint on the variable of Unity project and when the breakpoint be hit, you could open Watch Window, and use & to get the address of variable like this:

2) Then copy the address in the Memory Window and you can see the memory content about it:

Besides, you could also try to use Unity Profiler just as Lotan recommended to watch the memory content.

这篇关于调试 ->窗口 ->Unity 项目的内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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