In Delphi: How to skip sections of code while debugging?

前端 未结 8 1108
有刺的猬
有刺的猬 2020-12-24 04:18

I often accidently step into code that I\'m not interested in while debugging in Delphi.

Let\'s start by saying that I know that you can step over with F8, and that

相关标签:
8条回答
  • 2020-12-24 05:13

    No. I don't believe there is a way to tell the debugger to never stop in a certain section of code. There is no magic directive.

    The best you can do when you get into a routine you don't want to be in is to use Shift+F8 which will Run until the Return. Then do a F7 or F8 to exit the procedure.


    Hmmm. Now I see Mason's answer. Learned something. Thanks, Mason. +1

    0 讨论(0)
  • 2020-12-24 05:17

    Although it isn't a direct answer to your question, you could modify your first suggested solution by putting breakpoint at bla that is only enabled when a breakpoint at Foo is passed (or some other condition of your choose, such as iteration count). Then it will only break when you want it to.

    As an aside, I am finding more and more that I am not halting execution at break points, but rather dumping variable values or stack dumps to the message log. This allows more careful analysis than on-the-fly inspection of variables, etc. FWIW.

    0 讨论(0)
提交回复
热议问题