[Qt-creator] check if debugger is running
Eike Ziller
Eike.Ziller at qt.io
Tue Oct 31 15:16:00 CET 2023
Hi,
since multiple debuggers could be running for different projects etc
I guess getting all current RunControls with ProjectExplorerPlugin::allRunControls(), and checking their runMode() (ProjectExplorer::Constants::DEBUG_RUN_MODE) and if they are isRunning() or isStarting(), and possibly checking their project()/target() would be a possibility.
Br, Eike
> Am 31.10.2023 um 14:57 schrieb Knut Petter Svendsen via Qt-creator <qt-creator at qt-project.org>:
>
> Hi!
>
> In my plugin, I've established a slot connected to the
> EditorManager::currentEditorChanged signal. I'm looking for a way to
> determine if I'm presently in a debugging session within this slot. This
> distinction is important as I intend to perform different actions based on
> this context.
>
> Although checking Core::ModeManager::currentModeId() against
> Debugger::Constants::MODE_DEBUG allows me to ascertain if I'm in debugging
> mode, it doesn't inform me whether the debugger is actively running.
>
> Knut
>
> --
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Erich-Thilo-Str. 10
12489 Berlin, Germany
eike.ziller at qt.io
https://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator
mailing list