Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

delphi Debugging only my source [duplicate]

Possible Duplicate:
How do I stop the debugger from stepping into Delphi-supplied units?

I have a following problem: when I am running application, the debugger gets into delphi's VCL source. I want it to run just through code I wrote.

Example:

temp := nil;
// Here is breakpoint, after that I wanna go line-by-line, so I'm hitting F7
while (Head <> nil) do begin
   if (Head^.Next = nil) then break;
   Temp := Head^.Next;
   dispose(Head); // <- here debugger goes into [*]
end;
if (Temp <> nil) then dispose(Temp);

// [*]
procedure _Dispose(P: Pointer; TypeInfo: Pointer);
{$IFDEF PUREPASCAL}
begin
  _Finalize(P, TypeInfo);
  FreeMem(P);
end;
{$ELSE}
asm
        { ->    EAX     Pointer to object to be disposed        }
        {       EDX     Pointer to type info                    }

{$IFDEF ALIGN_STACK}
        SUB     ESP, 8
{$ENDIF ALIGN_STACK}
        PUSH    EAX
        CALL    _Finalize
        POP     EAX
{$IFDEF ALIGN_STACK}
        SUB     ESP, 4
{$ENDIF ALIGN_STACK}
        CALL    _FreeMem
{$IFDEF ALIGN_STACK}
        ADD     ESP, 12
{$ENDIF ALIGN_STACK}
end;
{$ENDIF !PUREPASCAL}

I have read this, and it haven't helped me. How to exclude delphi sources, to do debugging only my code?

like image 839
Jack L. Avatar asked Dec 26 '12 14:12

Jack L.


1 Answers

Look in the Project->Options menu item. Go to Compiler Options and there should be a setting that says "Use Debug DCUs". Make sure it's not checked, and you should stop tracing into standard library sources.

like image 99
Mason Wheeler Avatar answered Oct 09 '22 08:10

Mason Wheeler