fpmdebug.inc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Debug menu entries
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. procedure TIDEApp.DoUserScreenWindow;
  13. begin
  14. if UserScreenWindow=nil then
  15. begin
  16. New(UserScreenWindow, Init(UserScreen, SearchFreeWindowNo));
  17. Desktop^.Insert(UserScreenWindow);
  18. end;
  19. UserScreenWindow^.MakeFirst;
  20. end;
  21. procedure TIDEApp.DoUserScreen;
  22. begin
  23. if UserScreen=nil then
  24. begin
  25. ErrorBox('Sorry, user screen not available.',nil);
  26. Exit;
  27. end;
  28. ShowUserScreen;
  29. Keyboard.GetKeyEvent;
  30. while (Keyboard.PollKeyEvent<>0) do
  31. Keyboard.GetKeyEvent;
  32. ShowIDEScreen;
  33. end;
  34. procedure TIDEApp.DoShowCallStack;
  35. begin
  36. NotImplemented;
  37. end;
  38. procedure TIDEApp.DoShowBreakpointList;
  39. begin
  40. {$ifdef NODEBUG}
  41. NoDebugger;
  42. {$else}
  43. If assigned(BreakpointsWindow) then
  44. begin
  45. BreakpointsWindow^.Update;
  46. BreakpointsWindow^.Show;
  47. BreakpointsWindow^.MakeFirst;
  48. end
  49. else
  50. begin
  51. New(BreakpointsWindow,Init);
  52. Desktop^.Insert(BreakpointsWindow);
  53. end;
  54. {$endif NODEBUG}
  55. end;
  56. procedure TIDEApp.DoShowWatches;
  57. begin
  58. {$ifdef NODEBUG}
  59. NoDebugger;
  60. {$else}
  61. If assigned(WatchesWindow) then
  62. begin
  63. WatchesWindow^.Update;
  64. WatchesWindow^.MakeFirst;
  65. end
  66. else
  67. begin
  68. New(WatchesWindow,Init);
  69. Desktop^.Insert(WatchesWindow);
  70. end;
  71. {$endif NODEBUG}
  72. end;
  73. procedure TIDEApp.DoAddWatch;
  74. {$ifdef NODEBUG}
  75. begin
  76. NoDebugger;
  77. end;
  78. {$else}
  79. var
  80. P: PWatch;
  81. EditorWindow : PSourceWindow;
  82. S : string;
  83. begin
  84. EditorWindow:=FirstEditorWindow;
  85. If assigned(EditorWindow) then
  86. S:=LowerCaseStr(EditorWindow^.Editor^.GetCurrentWord)
  87. else
  88. S:='';
  89. P:=New(PWatch,Init(S));
  90. if ExecuteDialog(New(PWatchItemDialog,Init(P)),nil)<>cmCancel then
  91. begin
  92. WatchesCollection^.Insert(P);
  93. WatchesCollection^.Update;
  94. end
  95. else
  96. dispose(P,Done);
  97. end;
  98. {$endif NODEBUG}
  99. {
  100. $Log$
  101. Revision 1.7 1999-07-28 23:11:19 peter
  102. * fixes from gabor
  103. Revision 1.6 1999/07/10 01:24:19 pierre
  104. + First implementation of watches window
  105. Revision 1.5 1999/06/30 23:58:17 pierre
  106. + BreakpointsList Window implemented
  107. with Edit/New/Delete functions
  108. + Individual breakpoint dialog with support for all types
  109. ignorecount and conditions
  110. (commands are not yet implemented, don't know if this wolud be useful)
  111. awatch and rwatch have problems because GDB does not annotate them
  112. I fixed v4.16 for this
  113. Revision 1.4 1999/06/25 00:36:51 pierre
  114. + missing Debug menu added (not implemented yet)
  115. Revision 1.3 1999/02/02 16:41:40 peter
  116. + automatic .pas/.pp adding by opening of file
  117. * better debuggerscreen changes
  118. Revision 1.2 1999/01/21 11:54:16 peter
  119. + tools menu
  120. + speedsearch in symbolbrowser
  121. * working run command
  122. Revision 1.1 1998/12/28 15:47:47 peter
  123. + Added user screen support, display & window
  124. + Implemented Editor,Mouse Options dialog
  125. + Added location of .INI and .CFG file
  126. + Option (INI) file managment implemented (see bottom of Options Menu)
  127. + Switches updated
  128. + Run program
  129. }