I don't think there should be a "correct" way to steal focus. When I'm editing a document, I don't want _any_ application to steal focus. I don't want a window to show up and steal focus when something needs reauthentication. Maybe the developer of an application thought that his use case is of the very utmost urgency and requires immediate action. I don't agree. Just notify me over the standard way that the system provides and I will deal with it when I want to.
For the debugger use case: If the IDE has already focus, it can pass an activation token to the debugger and the debugger can use this to focus itself. If the IDE is not focused, I don't want the debugger to steal focus.
For the debugger use case: If the IDE has already focus, it can pass an activation token to the debugger and the debugger can use this to focus itself. If the IDE is not focused, I don't want the debugger to steal focus.