[英]Debugging in Delphi (RAD Studio) - viewing class properties in Watch List
When I set breakpoint in code and I want to check properties of some class in RAD Studio 2009 (Delphi project) I cannot see them in Watch List or in Local Variables list. 当我在代码中设置断点并且想要检查RAD Studio 2009(Delphi项目)中某个类的属性时,在监视列表或“局部变量”列表中看不到它们。
All I see is Pointer (Address) as TSomeClass . 我所看到的只是Pointer(Address)作为TSomeClass 。
Why I see this? 为什么我看到这个? I use also Visual Studio where it is amazing - I can see Properties and all members of some class.
我还使用Visual Studio,这真是太神奇了-我可以看到Properties和某个类的所有成员。
I am sure the same worked in some older versions of Delphi too (There was small [+] which could be expanded to see class properties). 我确信在某些较旧的Delphi版本中也可以使用(有小[+],可以扩展以查看类属性)。
Is there some settings for this (I have turned off optimizations, turned on Debug...) 是否有一些设置(我已关闭优化,已打开调试...)
Maybe this is a trivial question but I am not able to continue with my project as this is really uncomfortable for me. 也许这是一个琐碎的问题,但是我无法继续我的项目,因为这对我来说真的很不舒服。
You are not comparing like with like. 您不是在以喜欢的方式进行比较。 The variable in the Delphi screenshot is an interface.
Delphi屏幕截图中的变量是一个接口。 It has no data members, only methods.
它没有数据成员,只有方法。 The debugger won't call methods to display tooltips, etc. since methods can have side-effects.
调试器不会调用方法来显示工具提示等,因为方法可能会产生副作用。 You don't want your tooltips changing the meaning of the program.
您不希望您的工具提示更改程序的含义。
On the other hand, your VS example is a class with data members. 另一方面,您的VS示例是带有数据成员的类。 These are displayed in the debugger nicely in VS, and in Delphi for that matter.
这些可以很好地在VS和Delphi中显示在调试器中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.