简体   繁体   English

如何在Delphi 6(Pro)中调试自定义属性编辑器?

[英]How to debug a Custom Property Editor in Delphi 6 (Pro)?

How can I set breakpoints and trace through a Custom Property Editor I wrote for one of my VCL derived components (Component Palette member)? 如何设置断点并通过为VCL派生的组件之一(Component Palette成员)编写的自定义属性编辑器进行跟踪? The problem of course is that I want to debug code that is running in a compiled BPL while the IDE is active and is not running an active application. 当然,问题是我想调试在IDE处于活动状态且未运行活动应用程序时在已编译BPL中运行的代码。 Setting breakpoints in the BPL source file does not do anything. 在BPL源文件中设置断点不会执行任何操作。

Links to a tutorial or article on debugging Custom Property Editors would be great too. 链接到有关调试自定义属性编辑器的教程或文章的链接也很好。

Thanks. 谢谢。

Tell the IDE to use itself as the host application and hit the "Run" button. 告诉IDE将自身用作主机应用程序,然后单击“运行”按钮。 It'll spawn a new instance of the IDE, and you can do whatever you need to make it hit the breakpoint you set and you can debug it as you normally would. 它会生成一个新的IDE实例,您可以做任何使它达到设置的断点的操作,并且可以像往常一样调试它。

I'm not 100% sure where it is in D6, but in D2010, it's set under Run > Parameters... I think it's the same for D6, but like I said, I'm not sure. 我不确定100%是否在D6中,但是在D2010中,它是在“运行”>“参数”下设置的。我认为D6相同,但是就像我说的那样,我不确定。 If you don't see that particular menu item, you should have something similar. 如果没有看到该特定菜单项,则应该有类似的内容。

使用OutputDebugString可以帮助...当然不能像断点和逐步操作那样酷,但是您可以跟踪流和输出值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM