1 \input texinfo @comment -*-texinfo-*-
2 @comment %**start of header
3 @setfilename ../info/edebug.info
4 @settitle Edebug User Manual
5 @comment %**end of header
7 @comment ================================================================
8 @comment This file has the same style as the XEmacs Lisp Reference Manual.
9 @comment Run tex using version of `texinfo.tex' that comes with the elisp
10 @comment manual. Also, run `makeinfo' rather than `texinfo-format-buffer'.
11 @comment ================================================================
16 @comment \overfullrule=0pt
20 @comment Combine indices.
26 @comment texinfo-format-buffer no longer ignores synindex.
30 This file documents Edebug
32 This is edition 1.6 of the Edebug User Manual
33 for edebug Version 3.4,
35 Copyright (C) 1991,1992,1993,1994 Free Software Foundation, Inc.
37 Permission is granted to make and distribute verbatim copies of
38 this manual provided the copyright notice and this permission notice
39 are preserved on all copies.
42 Permission is granted to process this file through TeX and print the
43 results, provided the printed document carries copying permission
44 notice identical to this one except for the removal of this paragraph
45 (this paragraph not being relevant to the printed manual).
48 Permission is granted to copy and distribute modified versions of this
49 manual under the conditions for verbatim copying, provided that the entire
50 resulting derived work is distributed under the terms of a permission
51 notice identical to this one.
53 Permission is granted to copy and distribute translations of this manual
54 into another language, under the above conditions for modified versions,
55 except that this permission notice may be stated in a translation approved
61 @setchapternewpage odd
64 @title Edebug User Manual
65 @subtitle A Source Level Debugger for XEmacs Lisp
66 @subtitle Edition 1.6, February 1994
68 @author by Daniel LaLiberte, liberte@@cs.uiuc.edu
70 @vskip 0pt plus 1filll
71 Copyright @copyright{} 1991,1992,1993,1994 Daniel LaLiberte
74 This is edition 1.6 of the @cite{Edebug User Manual}
75 for edebug Version 3.4, February 1994
80 Permission is granted to make and distribute verbatim copies of
81 this manual provided the copyright notice and this permission notice
82 are preserved on all copies.
84 Permission is granted to copy and distribute modified versions of this
85 manual under the conditions for verbatim copying, provided that the entire
86 resulting derived work is distributed under the terms of a permission
87 notice identical to this one.
89 Permission is granted to copy and distribute translations of this manual
90 into another language, under the above conditions for modified versions,
91 except that this permission notice may be stated in a translation approved
97 @node Top, Edebug, (dir), (dir)
98 @chapter Edebug User Manual
100 Edebug is a source-level debugger for XEmacs Lisp programs.
105 * Bugs and Todo List:: Bugs and Todo List
109 @c from included file:
110 @c @node Edebug, Bugs and Todo List, Top, Top
113 @include edebug-inc.texi
116 @node Bugs and Todo List, Index, Edebug, Top
117 @section Bugs and Todo List
119 A debugger should be as bug free as possible, and I strive to achieve
120 perfection. But Edebug is fairly complex and I don't understand all of
121 it any more, so bugs happen. Please report anything suspicious to save
122 someone else the trouble of finding the same bug. Email to
123 liberte@@cs.uiuc.edu. There is also a mailing list for Edebug beta
124 testers: edebug-request@@cs.uiuc.edu.
126 @cindex bugs in Edebug
127 If you want to run Edebug on Edebug itself, often it is easiest to first
128 copy a reliable version of @file{edebug.el} into another file, say
129 @file{fdebug.el}, and replace all strings @samp{edebug} with
130 @samp{fdebug}, then evaluate the fdebug buffer and run Fdebug on
133 The following is a list of things I might do in the future, but often I
134 do other things not on the list as I discover the need for them. Send
135 me your suggestions and priorities.
140 Bug: I've noticed that the point of some buffers is reset to the point
141 of some other buffer, but I haven't been able to repeat it so perhaps
145 There may be a bug in the trace buffer display. It should display as
146 much as it can of the bottom of the buffer, but I think it scrolls off
149 There is a bug in window updating when there is both a trace buffer
150 and an evaluation list - the source buffer doesn't get displayed.
153 Killing and reinserting an instrumented definition or parts of
154 it leaves marks in the buffer which may confuse Edebug later.
157 Design problem: The position of definitions with complex names (e.g.
158 defmethod) cannot be remembered properly, but nor can the names of such
159 definitions be determined from calls of them.
162 After some errors, with @code{edebug-on-error} non-@code{nil}, continuing
163 execution succeeds, returning @code{nil}.
166 There are some interesting problems with defining or executing keyboard
167 macros across the Edebug activation boundary.
170 There are no other known bugs, so if you find any, please let me know.
171 There is nothing worse than a buggy debugger!
174 I need to rethink locally binding @code{debug-on-error},
175 @code{debug-on-quit}, and keyboard macro state variables. Should we
176 allow the global values to be changed by the user?
179 "(" in the first column of doc strings messes up edebug reading.
180 But no more than normal.
183 There could be a command to return a value from the debugger -
184 particularly useful for errors.
187 Let me know if you find any side effects that could be avoided
188 or at least documented in the manual.
189 Also @pxref{The Outside Context}.
192 @cindex selective display
193 Make edebug work with selective display - don't stop in hidden lines.
196 Debug just one or selected subexpressions of a definition - the rest is
200 Should @code{overlay-arrow-position} and @code{-string} be buffer local?
201 It would be better if they could be window-local.
204 Use copy of @code{current-local-map} instead of @code{emacs-lisp-mode-map}
205 (but only copy the first time after lower level command - to save time).
208 Better integration with standard debug.
211 Use @code{inhibit-quit} while edebugging?
214 Crawl mode would @code{sit-for} 0 or 1 in the outside window configuration
215 between each edebug step.
216 Maybe it should be a separate option that applies to trace as well.
219 Customizable @code{sit-for} time. Less than a second would be nice.
222 Generalize step, trace, Trace-fast to one command with argument for
224 Generalize go, continue, Continue-fast to another command with argument
227 Counting conditions - stop after n iterations. You can do it manually now
228 with conditional breakpoints.
231 Performance monitoring - summarize trace data.
234 Preserve breakpoints across instrumenting.
235 You can now install calls to @code{edebug} in your code.
238 After stepping into code not previously instrumented (with
239 @code{edebug-step-in}), maybe restore to non-instrumented code after
243 Optionally replace expressions with results in a separate buffer from
244 the source code. This idea is based on discussions with Carl Witty
245 regarding his stepper debugger. Also, unparse code into its own buffer
246 if source code is not available, or if user wishes to use
247 replace-with-results mode.
250 Preserve previous bindings of local variables, and allow user to jump
251 back to previous frames, particularly binding frames (i.e. @code{let},
252 @code{condition-case}, function and macro calls) to view values at that
253 frame. What about buffer local variables? It would be simpler to have
254 access to the Lisp stack.
256 Variables display, like the evaluation list but automatically display
257 all local variables and values.
260 Investigate minimal instrumentation that doesn't call edebug functions
261 but instead sets edebug index and result variables. Stepping is done
262 through standard debugger features such as setting
263 @code{debug-on-next-call}. Breakpoints are done by modifying code as
264 well as calling @code{backtrace-debug} for active frames.
267 Edebugging of uninstrumented code. Similar to above minimal
268 instrumentation but find out where we are at each edebug call by looking
269 in a map from each list form in the code to its position.
270 Problem is symbols are not unique.
273 Investigate hiding debugger internal stack frames. This is both to
274 simplify the standard debugger (which currently must be byte compiled to
275 work) and to better support the integration of edebug and the standard
279 Fix Emacs' lack of stack checking. The current workaround of
280 incrementing @code{max-lisp-eval-depth} and @code{max-specpdl-size} is
284 Although variables can't be tracked everywhere, watchpoints would be
285 nice for variables that edebug can monitor. That is, when the value of
286 a specific variable changes, edebug would stop. This can be done now
287 with the @code{edebug-global-break-condition}, though it is awkward.
290 How about a command to add the previous sexp (?) to the eval-list?
293 Highlight all instrumented code, breakpoints, and subexpressions about
294 to be evaluated or just evaluated. This should be done in a way that
295 works with Epoch, XEmacs, and Emacs 19.
301 @node Index, , Bugs and Todo List, Top
306 @comment To prevent the Concept Index's last page from being numbered "i".