Awesome! Cross platform break-to-debugger!
I don’t use exceptions to handle errors because they are yucky. However, I do use them to indicate logic errors (like array index out of bounds, or invalid iterators) and when they get thrown I want my app to terminate, even in release builds so that my users can reproduce it and then I can track it down. I also build symbols into my Release executable so my programmer friends can give me a stack while they test.
But the problem with Visual Studio 2008 is that it seems impossible to get a breakpoint at the throw line. It always breaks after the throw and I can’t see where the exception came from. Using this simple function solved the problem:
template <class Exception>
inline void Throw (const Exception& e)
juce_breakDebugger; // lets you get a breakpoint at the throw line
So that’s why I want juce_breakDebugger (or some other name) available no matter what, on all platforms. It is quite handy.