diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/edebug-options.html | |
new repository
Diffstat (limited to 'devdocs/elisp/edebug-options.html')
| -rw-r--r-- | devdocs/elisp/edebug-options.html | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/devdocs/elisp/edebug-options.html b/devdocs/elisp/edebug-options.html new file mode 100644 index 00000000..2d123078 --- /dev/null +++ b/devdocs/elisp/edebug-options.html @@ -0,0 +1,70 @@ + <h4 class="subsection">Edebug Options</h4> <p>These options affect the behavior of Edebug: </p> <dl> <dt id="edebug-setup-hook">User Option: <strong>edebug-setup-hook</strong> +</dt> <dd><p>Functions to call before Edebug is used. Each time it is set to a new value, Edebug will call those functions once and then reset <code>edebug-setup-hook</code> to <code>nil</code>. You could use this to load up Edebug specifications associated with a package you are using, but only when you also use Edebug. See <a href="instrumenting">Instrumenting</a>. </p></dd> +</dl> <dl> <dt id="edebug-all-defs">User Option: <strong>edebug-all-defs</strong> +</dt> <dd> +<p>If this is non-<code>nil</code>, normal evaluation of defining forms such as <code>defun</code> and <code>defmacro</code> instruments them for Edebug. This applies to <code>eval-defun</code>, <code>eval-region</code>, <code>eval-buffer</code>, and <code>eval-current-buffer</code>. </p> <p>Use the command <kbd>M-x edebug-all-defs</kbd> to toggle the value of this option. See <a href="instrumenting">Instrumenting</a>. </p> +</dd> +</dl> <dl> <dt id="edebug-all-forms">User Option: <strong>edebug-all-forms</strong> +</dt> <dd> +<p>If this is non-<code>nil</code>, the commands <code>eval-defun</code>, <code>eval-region</code>, <code>eval-buffer</code>, and <code>eval-current-buffer</code> instrument all forms, even those that don’t define anything. This doesn’t apply to loading or evaluations in the minibuffer. </p> <p>Use the command <kbd>M-x edebug-all-forms</kbd> to toggle the value of this option. See <a href="instrumenting">Instrumenting</a>. </p> +</dd> +</dl> <dl> <dt id="edebug-eval-macro-args">User Option: <strong>edebug-eval-macro-args</strong> +</dt> <dd><p>When this is non-<code>nil</code>, all macro arguments will be instrumented in the generated code. For any macro, the <code>debug</code> declaration overrides this option. So to specify exceptions for macros that have some arguments evaluated and some not, use the <code>debug</code> declaration specify an Edebug form specification. </p></dd> +</dl> <dl> <dt id="edebug-save-windows">User Option: <strong>edebug-save-windows</strong> +</dt> <dd> +<p>If this is non-<code>nil</code>, Edebug saves and restores the window configuration. That takes some time, so if your program does not care what happens to the window configurations, it is better to set this variable to <code>nil</code>. </p> <p>If the value is a list, only the listed windows are saved and restored. </p> <p>You can use the <kbd>W</kbd> command in Edebug to change this variable interactively. See <a href="edebug-display-update">Edebug Display Update</a>. </p> +</dd> +</dl> <dl> <dt id="edebug-save-displayed-buffer-points">User Option: <strong>edebug-save-displayed-buffer-points</strong> +</dt> <dd> +<p>If this is non-<code>nil</code>, Edebug saves and restores point in all displayed buffers. </p> <p>Saving and restoring point in other buffers is necessary if you are debugging code that changes the point of a buffer that is displayed in a non-selected window. If Edebug or the user then selects the window, point in that buffer will move to the window’s value of point. </p> <p>Saving and restoring point in all buffers is expensive, since it requires selecting each window twice, so enable this only if you need it. See <a href="edebug-display-update">Edebug Display Update</a>. </p> +</dd> +</dl> <dl> <dt id="edebug-initial-mode">User Option: <strong>edebug-initial-mode</strong> +</dt> <dd> +<p>If this variable is non-<code>nil</code>, it specifies the initial execution mode for Edebug when it is first activated. Possible values are <code>step</code>, <code>next</code>, <code>go</code>, <code>Go-nonstop</code>, <code>trace</code>, <code>Trace-fast</code>, <code>continue</code>, and <code>Continue-fast</code>. </p> <p>The default value is <code>step</code>. This variable can be set interactively with <kbd>C-x C-a C-m</kbd> (<code>edebug-set-initial-mode</code>). See <a href="edebug-execution-modes">Edebug Execution Modes</a>. </p> +</dd> +</dl> <dl> <dt id="edebug-trace">User Option: <strong>edebug-trace</strong> +</dt> <dd> +<p>If this is non-<code>nil</code>, trace each function entry and exit. Tracing output is displayed in a buffer named <samp>*edebug-trace*</samp>, one function entry or exit per line, indented by the recursion level. </p> <p>Also see <code>edebug-tracing</code>, in <a href="trace-buffer">Trace Buffer</a>. </p> +</dd> +</dl> <dl> <dt id="edebug-test-coverage">User Option: <strong>edebug-test-coverage</strong> +</dt> <dd><p>If non-<code>nil</code>, Edebug tests coverage of all expressions debugged. See <a href="coverage-testing">Coverage Testing</a>. </p></dd> +</dl> <dl> <dt id="edebug-continue-kbd-macro">User Option: <strong>edebug-continue-kbd-macro</strong> +</dt> <dd><p>If non-<code>nil</code>, continue defining or executing any keyboard macro that is executing outside of Edebug. Use this with caution since it is not debugged. See <a href="edebug-execution-modes">Edebug Execution Modes</a>. </p></dd> +</dl> <dl> <dt id="edebug-print-length">User Option: <strong>edebug-print-length</strong> +</dt> <dd><p>If non-<code>nil</code>, the default value of <code>print-length</code> for printing results in Edebug. See <a href="output-variables">Output Variables</a>. </p></dd> +</dl> <dl> <dt id="edebug-print-level">User Option: <strong>edebug-print-level</strong> +</dt> <dd><p>If non-<code>nil</code>, the default value of <code>print-level</code> for printing results in Edebug. See <a href="output-variables">Output Variables</a>. </p></dd> +</dl> <dl> <dt id="edebug-print-circle">User Option: <strong>edebug-print-circle</strong> +</dt> <dd><p>If non-<code>nil</code>, the default value of <code>print-circle</code> for printing results in Edebug. See <a href="output-variables">Output Variables</a>. </p></dd> +</dl> <dl> <dt id="edebug-unwrap-results">User Option: <strong>edebug-unwrap-results</strong> +</dt> <dd> +<p>If non-<code>nil</code>, Edebug tries to remove any of its own instrumentation when showing the results of expressions. This is relevant when debugging macros where the results of expressions are themselves instrumented expressions. As a very artificial example, suppose that the example function <code>fac</code> has been instrumented, and consider a macro of the form: </p> <div class="example"> <pre class="example">(defmacro test () "Edebug example." + (if (symbol-function 'fac) + …)) +</pre> +</div> <p>If you instrument the <code>test</code> macro and step through it, then by default the result of the <code>symbol-function</code> call has numerous <code>edebug-after</code> and <code>edebug-before</code> forms, which can make it difficult to see the actual result. If <code>edebug-unwrap-results</code> is non-<code>nil</code>, Edebug tries to remove these forms from the result. </p> +</dd> +</dl> <dl> <dt id="edebug-on-error">User Option: <strong>edebug-on-error</strong> +</dt> <dd><p>Edebug binds <code>debug-on-error</code> to this value, if <code>debug-on-error</code> was previously <code>nil</code>. See <a href="trapping-errors">Trapping Errors</a>. </p></dd> +</dl> <dl> <dt id="edebug-on-quit">User Option: <strong>edebug-on-quit</strong> +</dt> <dd><p>Edebug binds <code>debug-on-quit</code> to this value, if <code>debug-on-quit</code> was previously <code>nil</code>. See <a href="trapping-errors">Trapping Errors</a>. </p></dd> +</dl> <p>If you change the values of <code>edebug-on-error</code> or <code>edebug-on-quit</code> while Edebug is active, their values won’t be used until the <em>next</em> time Edebug is invoked via a new command. </p> <dl> <dt id="edebug-global-break-condition">User Option: <strong>edebug-global-break-condition</strong> +</dt> <dd><p>If non-<code>nil</code>, an expression to test for at every stop point. If the result is non-<code>nil</code>, then break. Errors are ignored. See <a href="global-break-condition">Global Break Condition</a>. </p></dd> +</dl> <dl> <dt id="edebug-sit-for-seconds">User Option: <strong>edebug-sit-for-seconds</strong> +</dt> <dd><p>Number of seconds to pause when a breakpoint is reached and the execution mode is trace or continue. See <a href="edebug-execution-modes">Edebug Execution Modes</a>. </p></dd> +</dl> <dl> <dt id="edebug-sit-on-break">User Option: <strong>edebug-sit-on-break</strong> +</dt> <dd><p>Whether or not to pause for <code>edebug-sit-for-seconds</code> on reaching a breakpoint. Set to <code>nil</code> to prevent the pause, non-<code>nil</code> to allow it. </p></dd> +</dl> <dl> <dt id="edebug-behavior-alist">User Option: <strong>edebug-behavior-alist</strong> +</dt> <dd> +<p>By default, this alist contains one entry with the key <code>edebug</code> and a list of three functions, which are the default implementations of the functions inserted in instrumented code: <code>edebug-enter</code>, <code>edebug-before</code> and <code>edebug-after</code>. To change Edebug’s behavior globally, modify the default entry. </p> <p>Edebug’s behavior may also be changed on a per-definition basis by adding an entry to this alist, with a key of your choice and three functions. Then set the <code>edebug-behavior</code> symbol property of an instrumented definition to the key of the new entry, and Edebug will call the new functions in place of its own for that definition. </p> +</dd> +</dl> <dl> <dt id="edebug-new-definition-function">User Option: <strong>edebug-new-definition-function</strong> +</dt> <dd><p>A function run by Edebug after it wraps the body of a definition or closure. After Edebug has initialized its own data, this function is called with one argument, the symbol associated with the definition, which may be the actual symbol defined or one generated by Edebug. This function may be used to set the <code>edebug-behavior</code> symbol property of each definition instrumented by Edebug. </p></dd> +</dl> <dl> <dt id="edebug-after-instrumentation-function">User Option: <strong>edebug-after-instrumentation-function</strong> +</dt> <dd><p>To inspect or modify Edebug’s instrumentation before it is used, set this variable to a function which takes one argument, an instrumented top-level form, and returns either the same or a replacement form, which Edebug will then use as the final result of instrumentation. </p></dd> +</dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug-Options.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug-Options.html</a> + </p> +</div> |
