5

When I run lldb with my program then do "run" in lldb, I get

error: process exited with status -1 (this is a non-interactive debug session, cannot get permission to debug processes.)

I've done both of these:

  • sudo DevToolsSecurity --enable
  • spctl developer-mode enable-terminal

That allowed me to debug when I'm sitting at the Mac, but it would be much more convenient to ssh in and use it remotely. Before I ran the above commands, both my program & lldb would be killed when I tried to run them.

Edited to add: One problem is that all programs on Apple silicon must be codesigned. I'm not building with Xcode, so I'm not automatically signing the code (yet).

I temporarily turned off System Integrity Protection until I can update our build process, which allows me to run the unsigned binaries I'm building, but I still haven't figured out how to remotely debug. If I'm sitting at the computer, it doesn't pop up a request for permission to debug. When I'm using ssh remotely, it gives the "non-interactive debug session" message from above.

Phillip S
  • 51
  • 3
  • 2
    While this doesn't solve your answer, I ran into this exact error with macOS 12.3 on Intel silicon and using `sudo DevToolsSecurity -enable` solved it for me. After that, I was able to run lldb inside tmux through ssh. – penguin359 Jun 16 '22 at 00:17
  • @penguin359 Thanks, this fixed it for me on Apple Silicon (both my local machine and remote machine). Ran that command in my ssh'd terminal and now can debug remote process using LLDB through VSCode. – pattymills Feb 04 '23 at 19:57

0 Answers0