diff options
Diffstat (limited to 'lispref/debugging.texi')
| -rw-r--r-- | lispref/debugging.texi | 35 |
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 |
| 121 | If you set this variable to a non-@code{nil} value, then | 121 | If 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 |
| 123 | command @code{eval-expression}. If | 123 | command @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 | |||
| 210 | function, and then step through its caller. | 210 | function, and then step through its caller. |
| 211 | 211 | ||
| 212 | @deffn Command debug-on-entry function-name | 212 | @deffn Command debug-on-entry function-name |
| 213 | This function requests @var{function-name} to invoke the debugger each time | 213 | This function requests @var{function-name} to invoke the debugger each |
| 214 | it is called. It works by inserting the form @code{(debug 'debug)} into | 214 | time it is called. It works by inserting the form |
| 215 | the function definition as the first form. | 215 | @code{(implement-debug-on-entry)} into the function definition as the |
| 216 | 216 | first form. | |
| 217 | Any function defined as Lisp code may be set to break on entry, | 217 | |
| 218 | regardless of whether it is interpreted code or compiled code. If the | 218 | Any function or macro defined as Lisp code may be set to break on |
| 219 | function is a command, it will enter the debugger when called from Lisp | 219 | entry, regardless of whether it is interpreted code or compiled code. |
| 220 | and when called interactively (after the reading of the arguments). You | 220 | If the function is a command, it will enter the debugger when called |
| 221 | can't debug primitive functions (i.e., those written in C) this way. | 221 | from Lisp and when called interactively (after the reading of the |
| 222 | arguments). 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 | ||
| 224 | primitive is called from Lisp code. Debug-on-entry is not allowed for | ||
| 225 | special forms. | ||
| 222 | 226 | ||
| 223 | When @code{debug-on-entry} is called interactively, it prompts for | 227 | When @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 |
| 271 | This function undoes the effect of @code{debug-on-entry} on | 275 | This 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 | 278 | omitted or @code{nil}, it cancels break-on-entry for all functions. |
| 275 | functions. | ||
| 276 | |||
| 277 | Calling @code{cancel-debug-on-entry} does nothing to a function which is | 279 | Calling @code{cancel-debug-on-entry} does nothing to a function which is |
| 278 | not currently set up to break on entry. It always returns | 280 | not 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 |