Note that there are some explanatory texts on larger screens.

plurals
  1. POIn Delphi: How to skip sections of code while debugging?
    primarykey
    data
    text
    <p>I often accidently step into code that I'm not interested in while debugging in Delphi.</p> <p>Let's start by saying that I know that you can step over with F8, and that you can run to a certain line with f4.</p> <p>Example:</p> <pre><code>function TMyClass.DoStuff():Integer; begin // do some stuff bla(); end; procedure TMyClass.Foo() begin if DoStuff()=0 then // press F7 when entering this line beep; end; </code></pre> <p>Example: I want to step into method DoStuff() by pressing F7, but instead of going there, I first end up in FastMM4.FastGetMem(), which is a massive blob of assembly code that obviously I'm not interested in at the moment.</p> <p>There are several ways to go about this, and I don't like any of them:</p> <ul> <li><p>Add a breakpoint on "<em>bla</em>" (almost useless if you only want to step into DoStuff on special occasions, like iteration 23498938);</p></li> <li><p>Instead of pressing F7, manually move the cursor to "<em>bla</em>", and press F4 (Works for this simple example. In practice, it doesn't); </p></li> <li><p>In case of FastMM: temporarily disable fastmm;</p></li> </ul> <p>Is there any way to hint the IDE that I'm <strong>never</strong> interested into stepping into a certain block of code, or do I always have to set extra breakpoints or use F4 to try to avoid this?</p> <p>I'm hoping for some magic compiler directive like {$NODEBUG BEGIN/END} or something like that.</p> <p>In most cases being able to exclude entire units would be fine-grained enough for me, but being able to avoid certain methods or even lines of code would be even better.</p> <p>Update: Maybe codegear should introduce something like <em>skip-points</em> (as opposed to break-points) :-)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload