如何在代码中模拟Delphi断点? [英] How to simulate a Delphi breakpoint in code?
问题描述
如下所示:
FooBar:= Foo(Bar);
SimulateBreakPoint; //在Delphi IDE中导致断点发生在
WriteLn('Value:'+ FooBar);
希望这是有道理的。我知道我可以使用一个例外,但这样会是更多的开销,然后我想要。这是一些演示代码。
提前感谢!
从代码触发调试器(据说我没有一个delphi的副本可以尝试):
asm int 3结束
看到这个页面:
http://17slon.com/blogs/gabr/2008/03 /debugging-with-lazy-breakpoints.html
I am pretty sure I have seen this before, but I haven't found out / remembered how to do it. I want to have a line of code that when executed from the Delphi debugger I want the debugger to pop-up like there was a break point on that line.
Something like:
FooBar := Foo(Bar);
SimulateBreakPoint; // Cause break point to occur in Delphi IDE if attached
WriteLn('Value: ' + FooBar);
Hopefully that makes sense. I know I could use an exception, but that would be a lot more overhead then I want. It is for some demonstration code.
Thanks in advance!
To trigger the debugger from code (supposedly, I don't have a copy of delphi handy to try):
asm int 3 end;
See this page:
http://17slon.com/blogs/gabr/2008/03/debugging-with-lazy-breakpoints.html
这篇关于如何在代码中模拟Delphi断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!