Browse Source

* Use desktop^.current instead of desktop^.first
* Avoid stopping at main if debugger started with CrtlF9

pierre 25 years ago
parent
commit
f9b0b57787
1 changed files with 10 additions and 6 deletions
  1. 10 6
      ide/text/fpmrun.inc

+ 10 - 6
ide/text/fpmrun.inc

@@ -80,7 +80,7 @@ begin
        exit;
        exit;
    end;
    end;
   if not debugger^.debuggee_started then
   if not debugger^.debuggee_started then
-    Debugger^.StartTrace
+    Debugger^.Run
   else
   else
    Debugger^.UntilReturn;
    Debugger^.UntilReturn;
   Debugger^.AnnotateError;
   Debugger^.AnnotateError;
@@ -123,7 +123,7 @@ begin
             InitDebugger;
             InitDebugger;
           if assigned(Debugger) then
           if assigned(Debugger) then
             begin
             begin
-              Debugger^.StartTrace;
+              Debugger^.Run;
               RunDirect:=false;
               RunDirect:=false;
             end;
             end;
         end;
         end;
@@ -197,14 +197,14 @@ var
   LineNr : longint;
   LineNr : longint;
 begin
 begin
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
-  if (DeskTop^.First=nil) or
-     (TypeOf(DeskTop^.First^)<>TypeOf(TSourceWindow)) then
+  if (DeskTop^.Current=nil) or
+     (TypeOf(DeskTop^.Current^)<>TypeOf(TSourceWindow)) then
     Begin
     Begin
        ErrorBox('Impossible to reach current cursor',nil);
        ErrorBox('Impossible to reach current cursor',nil);
        Exit;
        Exit;
     End;
     End;
 
 
-  W:=PSourceWindow(DeskTop^.First);
+  W:=PSourceWindow(DeskTop^.Current);
   If assigned(W) then
   If assigned(W) then
     begin
     begin
       FileName:=W^.Editor^.FileName;
       FileName:=W^.Editor^.FileName;
@@ -264,7 +264,11 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.26  2000-01-31 16:02:08  pierre
+  Revision 1.27  2000-02-02 22:48:25  pierre
+    * Use desktop^.current instead of desktop^.first
+    * Avoid stopping at main if debugger started with CrtlF9
+
+  Revision 1.26  2000/01/31 16:02:08  pierre
    * avoid the Impossible to set breakpoints here
    * avoid the Impossible to set breakpoints here
 
 
   Revision 1.25  2000/01/28 22:38:21  pierre
   Revision 1.25  2000/01/28 22:38:21  pierre