Terminating app by stopping debugger halts at vkWaitForFences

I am frequently stopping my app by pressing SHIFT-F5 in Qt Creator on Ubuntu.

Usually this brings one immediately back to the IDE.

When using Vulkan fences without timeout the debugger always halts in vulkan.hpp at this return statement:

VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT
{
  return ::vkWaitForFences( device, fenceCount, pFences, waitAll, timeout );
}

So to get back to the IDE I have to press SHIFT-F5 twice.

The code invoking the vkWaitForFences is:

waitForFences(1, &imageAcquiredFence, VK_TRUE, UINT64_MAX);

Probably the function just keeps waiting because the fence is not signaled. There is no crash it’s just that the debugger halts there instead of returning to the IDE. I wonder if there is any way to avoid this so that the Vulkan driver gets the debugger stop signal and the app just gracefully returns to the IDE on the first SHIFT-F5?

Thanks