I know you'd probably prefer to do it the way you want, but can I make a suggestion?
Wouldn't it be a bit better to have debug info printed as output so you could run your program from a terminal, and any error/debug messages would come up there. Because what if for instance a problem arises that stops the program from loading any windows? You won't have your debug info, at least at a terminal you could see why they werent loaded. You could even have a way of tracing variable value changes like:
int i = 3 => int i = 4
Printed on the screen so you can see what a variable changed from, and what its new value is. I dont know just a suggestion
(Sorry I don't know SDL so I can't answer the original question for you)