aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/debugging.texi
diff options
context:
space:
mode:
Diffstat (limited to 'lispref/debugging.texi')
-rw-r--r--lispref/debugging.texi35
1 files changed, 18 insertions, 17 deletions
diff --git a/lispref/debugging.texi b/lispref/debugging.texi
index 07dfe18f283..739dd1fe298 100644
--- a/lispref/debugging.texi
+++ b/lispref/debugging.texi
@@ -118,8 +118,8 @@ the error. The easiest way is usually to set
118@end defopt 118@end defopt
119 119
120@defopt eval-expression-debug-on-error 120@defopt eval-expression-debug-on-error
121If you set this variable to a non-@code{nil} value, then 121If this variable has a non-@code{nil} value, then
122@code{debug-on-error} will be set to @code{t} when evaluating with the 122@code{debug-on-error} is set to @code{t} when evaluating with the
123command @code{eval-expression}. If 123command @code{eval-expression}. If
124@code{eval-expression-debug-on-error} is @code{nil}, then the value of 124@code{eval-expression-debug-on-error} is @code{nil}, then the value of
125@code{debug-on-error} is not changed. @xref{Lisp Eval,, Evaluating 125@code{debug-on-error} is not changed. @xref{Lisp Eval,, Evaluating
@@ -210,15 +210,19 @@ called shortly before the problem, step quickly over the call to that
210function, and then step through its caller. 210function, and then step through its caller.
211 211
212@deffn Command debug-on-entry function-name 212@deffn Command debug-on-entry function-name
213This function requests @var{function-name} to invoke the debugger each time 213This function requests @var{function-name} to invoke the debugger each
214it is called. It works by inserting the form @code{(debug 'debug)} into 214time it is called. It works by inserting the form
215the function definition as the first form. 215@code{(implement-debug-on-entry)} into the function definition as the
216 216first form.
217Any function defined as Lisp code may be set to break on entry, 217
218regardless of whether it is interpreted code or compiled code. If the 218Any function or macro defined as Lisp code may be set to break on
219function is a command, it will enter the debugger when called from Lisp 219entry, regardless of whether it is interpreted code or compiled code.
220and when called interactively (after the reading of the arguments). You 220If the function is a command, it will enter the debugger when called
221can't debug primitive functions (i.e., those written in C) this way. 221from Lisp and when called interactively (after the reading of the
222arguments). You can also set debug-on-entry for primitive functions
223(i.e., those written in C) this way, but it only takes effect when the
224primitive is called from Lisp code. Debug-on-entry is not allowed for
225special forms.
222 226
223When @code{debug-on-entry} is called interactively, it prompts for 227When @code{debug-on-entry} is called interactively, it prompts for
224@var{function-name} in the minibuffer. If the function is already set 228@var{function-name} in the minibuffer. If the function is already set
@@ -267,16 +271,13 @@ Debugger entered--entering a function:
267@end example 271@end example
268@end deffn 272@end deffn
269 273
270@deffn Command cancel-debug-on-entry function-name 274@deffn Command cancel-debug-on-entry &optional function-name
271This function undoes the effect of @code{debug-on-entry} on 275This function undoes the effect of @code{debug-on-entry} on
272@var{function-name}. When called interactively, it prompts for 276@var{function-name}. When called interactively, it prompts for
273@var{function-name} in the minibuffer. If @var{function-name} is 277@var{function-name} in the minibuffer. If @var{function-name} is
274@code{nil} or the empty string, it cancels break-on-entry for all 278omitted or @code{nil}, it cancels break-on-entry for all functions.
275functions.
276
277Calling @code{cancel-debug-on-entry} does nothing to a function which is 279Calling @code{cancel-debug-on-entry} does nothing to a function which is
278not currently set up to break on entry. It always returns 280not currently set up to break on entry.
279@var{function-name}.
280@end deffn 281@end deffn
281 282
282@node Explicit Debug 283@node Explicit Debug