Enabling lldb on Mojave
written on Fri 28 June 2019
I have an impression that each version of macOS system introduces additional obstacles for developer. From one point of view I understand that they just want to make the system more secure, and that should be the biggest priority above all (well, maybe not above common sense). But it's hard to accept the fact that i.e. Valgrind doesn't work anymore, tools like
lldb don't work out of the box, etc.
To be able to use
lldb on Mojave and probably above, you need to enable developer mode. So, if you get this:
$ lldb ./test (lldb) target create "./test" Current executable set to './test' (x86_64). (lldb) r error: process exited with status -1 (Error 1) (lldb) ^D
try doing this:
$ sudo /usr/sbin/DevToolsSecurity -enable Password: Developer mode is now enabled.
After enabling "developer mode",
lldb should work again:
$ lldb ./test (lldb) target create "./test" Current executable set to './test' (x86_64). (lldb) r Process 41526 launched: '/Users/antek/dev/(...)/test' (x86_64) (...) Process 41526 exited with status = 0 (0x00000000) (lldb)