Integrated debuggers

Yes - the debugger :slight_smile: Use the debugger … get the stack trace when in crashes, inspect the local variables the cause is usually staring you in the face*

Except when it isn’t and you spend 2 days hunting*

**I’ve noticed that with a bit of experience the 2 days is now more like 2 minutes for a difficult one… but it definitely used to be two days.

Break points before everything is screwed up usually helps more!

Last occasion of the thing you mention, it was a memory corruption copying a small negative number of bytes casted to unsigned int for memcpy. No way to find that by staring at the debugger. It was even in a different thread!

I go with DBG() and starting from a terminal…

AAA (Almost Always Asan)
(and coming in Xcode 9 Undefined Behaviour Sanitizer!!!)

1 Like


AddressSanitizer. Sixth result:

More details about it here:

1 Like