Lately, I have been following the classic Vulkan tutorial and have successfully enabled the validation layer features and loaded the VK_EXT_debug_utils extension. I confirmed the latter when I forced an error during the instance creation and my registered callback was invoked as expected. Finally I wanted to test the error detection during cleanup and followed the suggestion of the tutorial to comment out destroying the debug utils messenger handle. To my surprise no errors have been reported.
Eventually I was able to track this issue down to winit and the run method. The way that method hijacks the main thread apparently makes it impossible for the Vulkan debug utils to report any diagnostics at shutdown. For testing purposes I replaced the call to EventLoop::run with EventLoop::run_return which returns the control flow. With the latter I got the expected error message about the extension leak when the application exits.
I'd like to know how I may reconcile the use of the EventLoop::run method with the debug utils.