But it would be neat to also have an option in the menu to run in debug mode, sacrificing run speed and efficiency for improved error reporting.
That's not possible... an application can be compiled either in Release mode or in Debug mode... not both.
That's exactly what the thing Meridian suggested does. Normally, compiling optimizes out pretty much everything human-readable in order to speed up execution of the program, but compiling with a debug flag keeps the line number, variable name, file name, etc. information available such that on crash, you can have that information. Doing so can also enormously slow down execution of the program, such that everybody will complain about low FPS. Good, or even just marginally useful, error handling is not an easy thing to just throw in the code, unless you want side effects like massive slowdown.
I'm no C++ expert, but I believe you don't have to compile in Debug mode to get a stack trace.
[04-12-2017_11-54-59] [FATAL] A fatal error has occurred: Item STR_SKYRANGER not found
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom13CrossPlatform10stackTraceEPv+0x1e) [0x824301e]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom13CrossPlatform9crashDumpEPvRKSs+0x444) [0x8243834]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_Z15exceptionLoggerv+0x5f) [0x80f1f1f]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x70833) [0xb7393833]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x708ad) [0xb73938ad]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/libstdc++.so.6(__cxa_rethrow+0) [0xb7393b70]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZNK8OpenXcom3Mod7getRuleINS_8RuleItemEEEPT_RKSsS6_RKSt3mapISsS4_St4lessISsESaISt4pairIS5_S4_EEEb+0x16b) [0x84397cb]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZNK8OpenXcom3Mod7getItemERKSsb+0x62) [0x8411232]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom20ManufactureInfoState14initProfitInfoEv+0xcc) [0x812766c]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom20ManufactureInfoState7buildUiEv+0x1668) [0x8129d48]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom20ManufactureInfoStateC2EPNS_4BaseEPNS_15RuleManufactureE+0x3d) [0x812b0ad]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom21ManufactureStartState13btnStartClickEPNS_6ActionE+0x41a) [0x812d50a]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom18InteractiveSurface6handleEPNS_6ActionEPNS_5StateE+0x1a2) [0x8261892]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom5State6handleEPNS_6ActionE+0x7b) [0x83028eb]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom4Game3runEv+0x2e8) [0x825c848]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(main+0x165) [0x80dc215]
[04-12-2017_11-55-05] [FATAL] OpenXcom has crashed: Item STR_SKYRANGER not found
Extra information has been saved to openxcom.log.
You should be able to get something like this also from Release mode... which already helps a LOT!
I am just using SupSuper's (for Linux), Yankes's (for Windows), darklord42's (for OSX) and sfalexrog's (for Android) build scripts/methods and for some reason, they don't generate such output (at least the one for Windows doesn't, I didn't check the rest really)... but I've seen stack traces in reports from people who compile themselves (like the one above) so it must be somehow possible.
As I said in the beginning, I am no C++ expert, I don't know how to configure this... but if anyone can help... I'll be happy to merge the change into OXCE+ repo(s).