Only use debugmessage control if debug message callback is valid