xcode – Debug Qt application on macOS with root permission using Qt Creator

Is it possible to debug a Qt application, which demands root privileges, in Qt Creator, without having to run the Qt Creator itself under root?

Currently I am writing a C++ app, which by design and by functionality does need root privileges. I need to debug it step by step, without any debug substitution workarounds (like using stdout, or stderr, or other files for output). Frankly saying, I do not like the idea to launch the Qt Creator under sudo at all.

There is a workaround under Linux though (Ubuntu, for example). This makes me think there must be some similar (if not exactly the same) workaround for such case under macOS as well. Nevertheless, I did not manage to find any solution. At least, I found out that versions of Qt Creator for Windows and Linux differ from the version for macOS in scope of the window, mentioned in the link above (Tools -> Options), which makes one really upset. If you know there is a solution or why there cannot be any solution at all (e.g. because of the macOS design, I do not know, I am not any kind of Apple or Linux guru), share please!