Next: , Previous: Files directories and localnames, Up: Top

10 How to Customize Traces

Tramp messages are raised with verbosity levels ranging from 0 to 10. Tramp does not display all messages; only those with a verbosity level less than or equal to tramp-verbose.

The verbosity levels are

 0 silent (no Tramp messages at all)
 1 errors
 2 warnings
 3 connection to remote hosts (default verbosity)
 4 activities
 5 internal
 6 sent and received strings
 7 file caching
 8 connection properties
 9 test commands
10 traces (huge)

With tramp-verbose greater than or equal to 4, messages are also written to a Tramp debug buffer. Such debug buffers are essential to bug and problem analyses. For Tramp bug reports, set the tramp-verbose level to 6 (see Bug Reports).

The debug buffer is in Outline Mode. In this buffer, messages can be filtered by their level. To see messages up to verbosity level 5, enter C-u 6 C-c C-q.

Tramp handles errors internally. But to get a Lisp backtrace, both the error and the signal have to be set as follows:

     (setq debug-on-error t
           debug-on-signal t)

If tramp-verbose is greater than or equal to 10, Lisp backtraces are also added to the Tramp debug buffer in case of errors.

To enable stepping through Tramp function call traces, they have to be specifically enabled as shown in this code:

     (require 'trace)
     (dolist (elt (all-completions "tramp-" obarray 'functionp))
       (trace-function-background (intern elt)))
     (untrace-function 'tramp-read-passwd)

The buffer *trace-output* contains the output from the function call traces. Disable tramp-read-passwd to stop password strings from being written to *trace-output*.