Nominate our 2022 Qt Champions!

Is there any way to keep or reconnect debugger after restarting application ?

  • I tried to develop restarting application with this article "How to restart an application by pressing a button?".

    But after application restarted, the debugger stopped and I can't reconnect the debugger.
    I think I can't keep connecting debugger after "qApp->quit()".

    If there is any way to keep debugging after restarted application, please tell me.


  • I found Attach to Running Application, and I could break C++ code on debugger.
    But I can't debug QML code because I can't know QML port for attaching.

    So, is there any way to know QML port for restarted application ?

    I tried following code
    Then app restarted, I tried "Attach to QML port" with QtCreator.
    But QtCreator couldn't connect to QML port "34567" for debugging.

    void Restarter::makeRestart( QString lib_namme )
        qint64 pid;


Log in to reply