0

I am attempting to edit a file. Emacs is preventing me from making the edit, and throwing: Args out of range: #<buffer user.action.js>, 4965, 17721. It is completely not obvious to me where this exception is coming from. How can I debug errors such as this one?

  • @Drew: the similarity between the two seems rather tenuous. – Stefan Sep 26 '18 at 15:21
  • @stefan: Indeed; sorry. The question is essentially how to see what happened & why, when an error is raised - catch the error and show a call stack. A general answer is, as you suggested, to show a backtrace via debug-on-error. Seems like the question has been asked, but I don't find a good duplicate. – Drew Sep 26 '18 at 16:00
2

Enable debugging via M-x toggle-debug-on-error or in the menu Options => Enter Debugger on Error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.