1

I'm having an issue when debugging c++ programs in emacs (using dap-mode, LSP, projectile...):

I have no problem with the debugger, as long as my code doesn't crash. But when the debugger hits a segmentation fault, I get the usual messages that I would see in gdb for instance, but then I also get this line:

Stopping due to fatal error: NotImplementedException: No handler implemented for request type: 'ExceptionInfoRequest'!

Then emacs freezes and the only way to unfreeze it is to kill clangd. however, when I get back control over emacs, LSP detects that clangd crashed, and suggests I restart the server. Even if I say no, emacs hangs again and I can only kill emacs to close it.

I am fairly new to emacs, and just discovered LSP / DAP integration, so I apologize if I missed anything obvious during the setup process. I don't know how to get further information on this error, I am not sure if the problem is in the vscode-cpptools, in clangd, emacs, or in the dap-mode package. Has anyone encountered the issue, or knows how to fix this?

lagarkane
  • 915
  • 2
  • 9
  • 22
  • I'm having the same issue with the same setup. Did you ever make any headway on it? – Juan P May 09 '22 at 18:30
  • 1
    Hey @JuanP I didn't manage to get the dap-cpptools package to work for me. I still have emacs hanging when trying to use this particular debugger. However, using lldb-vscode with the dap-lldb package, everything seems to run fine for me! You can find some very sparse documentation here on how to setup emacs with dap-lldb: https://emacs-lsp.github.io/dap-mode/page/configuration/#lldb However this blog post gives some really interesting, much more detailed instructions on how to set it up properly: https://www.hiroakit.com/archives/1966 – lagarkane May 12 '22 at 08:45
  • I would also add that I built lldb-vscode instead of relying on a pre-build vscode extension as it is suggested in the article. I had given up on emacs for debugging c++ code until you sent your comment, which motivated me to dig deeper so I thank you ;) – lagarkane May 12 '22 at 08:46
  • Fantastic - thanks for the pointers! I had also given up but now will give it another go. – Juan P May 12 '22 at 18:33

0 Answers0