lldb: Breakpoint on exceptions (equivalent of gdb's catch throw)

Use break set -E c++ to break on all exceptions and break set -F std::range_error to break on a specific exception.


In Xcode, you can set an Exception breakpoint (View > Navigators > Show Breakpoint Navigator, hit the + button in the bottom of the breakpoint list window to add a new breakpoint).

If you're using command line lldb, put a breakpoint on __cxa_throw for C++ exception throws, objc_exception_throw for Objective-C exception throws.

For all c++ exceptions: break set -E C++.