166 |
(lambda () (setq debug-on-error t))) |
(lambda () (setq debug-on-error t))) |
167 |
@end example |
@end example |
168 |
|
|
169 |
|
When the debugger is entered, it shows a backtrace (@pxref{Using |
170 |
|
Debugger}). If you like to see the backtrace when an error happens, |
171 |
|
but you do not want to enter the debugger, you can set the variable |
172 |
|
@code{stack-trace-on-error} to non-@code{nil}. |
173 |
|
|
174 |
|
@defopt stack-trace-on-error |
175 |
|
This variable determines whether a backtrace buffer is shown when an |
176 |
|
error is signalled and not handled. If @code{stack-trace-on-error} is |
177 |
|
@code{t}, all kinds of errors display a backtrace; if it is |
178 |
|
@code{nil}, none do. If the value is a list, an error only means to |
179 |
|
display a backtrace if one of its condition symbols appears in the |
180 |
|
list. |
181 |
|
@end defopt |
182 |
|
|
183 |
@node Infinite Loops |
@node Infinite Loops |
184 |
@subsection Debugging Infinite Loops |
@subsection Debugging Infinite Loops |
185 |
@cindex infinite loops |
@cindex infinite loops |