Last active
May 29, 2024 18:44
-
-
Save jdtsmith/1fbcacfe677d74bbe510aec80ac0050c to your computer and use it in GitHub Desktop.
Elisp: get stack trace for functions with suppressed errors (filter functions, post command hooks, etc.)
See also https://github.com/minad/vertico#debugging-vertico. The Vertico post-command-hook does not have any subtle bugs but some completion tables may have them. ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A very common source of "automatically caught and hidden errors" are process filter functions and post-command hooks. Many modes use these, and they can have subtle bugs. It can be frustrating to both users and mode developers if they can't reproduce your problem, and you can't get them a stack-trace.
Luckily, there is a nice way to re-enable such hidden errors, so that
debug-on-error
functions correctly. When you get one of those pesky "Error occurred in process filter function..." messages, justM-x toggle-debug-on-hidden-error
, pick the likely function, make suredebug-on-error
is on, and repeat whatever you did that lead to the error. Then toggle it back off.