开发者

Correct Delphi compiler switches to stop in the user's code, not my component's

I'm modifying our VCL components so the end user's application links to our dcu files, instead of building our source code each time. We have everything working, but I want the debugger to stop on the user's code when an exception is raised. At first it would stop in our dcu and open the CPU window. I was able to prevent that by removing debug info from the dcu files. But now it still doesn't stop in the users code (like DevExpress libraries and others do).

The following screencast is a short example. The first time I cause an exception in the DevExpress code, and the debugger correctly stops in my button event. The seco开发者_高级运维nd time I cause an exception in my components, but the debugger doesn't have my button event on the call stack, and doesn't show me where the problem was. Any ideas why?

http://screencast.com/t/NjhlOTRk

Currently building the DCU's with these options:

-$W+ -$D- -h -w -q

Update: The TDataSet methods in between my component and the button event seem to cause this behavior. If I instead call a direct method of my table, I get the expected behavior. I'm guessing there isn't anything I can do about this, but I'm still curious why it happens.


If the sourcecode is build instead of dcu's, there is something wrong in the configuration.

The dcus should be in the search path, the source in the browse path.

This way it is not possible for the compiler to not use the DCUs, and you can still debug.


Have you tried setting/unsetting: Project Options -> Delphi Compiler -> Compiling -> 'Use debug .dcus' (in the Debugging subsection)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜