- Set ptrace_scope to "1".
Looks like this can be done in /proc/sys/kernel/yama/ptrace_scope . It seems to be the default on Ubuntu 20.04 LTS. At least I cannot remember ever changing it.
- Build the manual test "gui".
It's in tests/manual/debugger/gui/gui.pro of Creator's repository.
I tried building it with release builds of Qt 5.15.2 and Qt 6.2.0 as well as with a developer build of Qt 6.2.0. All led to the same result.
- Run the resulting binary independently of Qt Creator.
- If you don't use German locale system-wide, start Creator with German locale, e.g.:
Creator will start with German UI.
You need to set the locale. Changing Creator's UI to German in its settings is not sufficient for reproducing the problem. Once again, this is the default on Ubuntu 20.04 LTS. Explicitly setting LC_ALL only allows reproducing the problem on systems using a different locale.
- From Creator's menu, select "Debuggen" -> "Debuggen" -> "Debugge externe, lokal laufende Anwendung".
- Select the process started in step 3 from the list and click "An Prozess anhängen".
Creator will try launching the debugger and fail silently. In the Application Output view ("Ausgabe der Anwendung") you can read something like:
The problem is not that debugging fails but that it fails silently. If you follow the above steps using LC_ALL=C instead of LC_ALL="de_DE.UTF-8", then Creator will show a message box that attaching failed because of ptrace settings. This will allow users to fix the situation. Without that message, users are completely helpless.
I attached the global debugger from the above steps.