Oliver Caldwell's blog
On languages, text editors and tools
Understanding Emacs errors
November 5, 2014
You can probably begin to get to the bottom of most internal Emacs problems with debug-on-entry. This function prompts for a function name interactively (which also hooks into helm) and will essentially set a breakpoint within Emacs on that function. When it is called you’ll get to see what functions were called and with what arguments.
This came out of my :w (evil write) stopping working today, it was down to this commit and fixed in this one. The prompt response was much appreciated.
But you can use debug-on-entry on the offending function (which you should be able to find in the messages buffer) to set a breakpoint and walk up the stack to see if you can understand the problem better. It was interesting in my case but didn’t solve the issue, I just commented on the GitHub mirror of the commit and the author fixed it for me. Open source rules.