There is a "pause" entry in the run menu.
There also are button for run, pause, stop, step in the toolbar below the menu.
- run: green triangle
- pause: 2 vertical bars
- stop: red square
....
You can pause an application that is running in the debugger. You can pause it at any time.
Of course if it is idle, it sits in the kernel. Then there may or may not be a stack trace....
If the debugged app is in the "show message" dialog, it will be in the kernel, but it is called by the showmessage code. => It depends on the debugger if it can get the stack.
I tested on Windows, and gdb was able..
About "threads".
At least on Windows the OS starts a helper thread when the debugger does things like pausing the app. So even if your app is not threaded, there may be more than one thread. (seen by the debugger, due to what the OS does).
Therefore you need to find the thread in which your code runs.
The way to do that, is to test them all, and see if for any thread you get a trace that includes code from your app.
The thread dialog has a "current" button. If you select an entry in the list below (while paused), and press current => then the debugger will updated the stack (and watches) to show data for that thread.
So you can select each thread, and try "current" and see what the stack window shows.
Stack and thread dialog are under menu: View > Debug Windows.
So now back to your issue.
If I got you right, when you run you app, then your app (unexpectedly) shows a message dialog?
This dialog waits for you to press OK or Cancel or whatever?
You are trying to find out why it is shown, or where it is called from?
So....
- run your app
- when the dialog is open, use the IDE and "pause" the app in the debugger.
- search the thread that has a callstack (there is no 100% guarantee that it will be there, but it's worth a shot)
If you are lucky, and you get a callstack, then you can find where in your app it happens, and from where it was called.