Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Is there any way to keep or reconnect debugger after restarting application ?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 251 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dmhk_4ss
    wrote on last edited by
    #1

    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.

    Thanks.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dmhk_4ss
      wrote on last edited by dmhk_4ss
      #2

      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 )
      {
          process.setProgram(qApp->arguments()[0]);
          process.setNativeArguments({"-qmljsdebugger=port:34567"});
          qint64 pid;
          process.startDetached(&pid);
      }
      

      Thanks.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved