Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Launching Debugger as sudo doesn't work
Forum Update on Monday, May 27th 2025

Launching Debugger as sudo doesn't work

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 424 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.
  • J Offline
    J Offline
    Josef Lintz
    wrote on last edited by Josef Lintz
    #1

    I have a console project which includes a library that needs root permissions to work properly (God knows why).

    I'm trying to launch the QT debugger as root by setting the terminal command to

    /usr/bin/x-terminal-emulator -e sudo

    The problem is when I run the program, it starts the terminal, in the bottom right "Launching debugger" is stuck at 25%~, and after typing in the root password it halts until a message box pop ups saying "GDB Not Responding".

    I made sure to use the correct kits and all.

    This is what's written to syslog after pressing "Stop debugging"

    "
    gnome-session[2049]: SOFT ASSERT: "state() == EngineShutdownRequested" in file /home/qt/work/build/qt-creator/src/plugins/debugger/debuggerengine.cpp, line 1668

    gnome-session[2049]: Debugger::Internal::GdbEngine(0x7a28a60, name = "GdbEngine") "EngineRunRequested"

    gnome-session[2049]: *** UNEXPECTED STATE TRANSITION: Debugger::Internal::GdbEngine(0x7a28a60, name = "GdbEngine") "State changed from EngineRunRequested(4) to EngineShutdownFinished(16)"

    gnome-session[2049]: SOFT ASSERT: "d->m_logWindow" in file /home/qt/work/build/qt-creator/src/plugins/debugger/debuggerengine.cpp, line 1741

    gnome-session[2049]: MSG: "HANDLE GDB ERROR: The process was ended forcefully.\nProcess crashed"

    gnome-session[2049]: SOFT ASSERT: "d->m_logWindow" in file /home/qt/work/build/qt-creator/src/plugins/debugger/debuggerengine.cpp, line 1741

    gnome-session[2049]: MSG: "GDB PROCESS FINISHED, status 1, exit code 9"
    "

    I also found a user with a similar problem. But unfortunately there are not solutions.

    I'm using Ubuntu 16.04, QT 5.11.1, and GDB 7.11.1

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      forget everything your college professor told you about how evil root logins are and log in directly as root, then try running the debugger. sudo will only half palf thru the required environment needed for the Qt tools...without extensive reworking of the sudoers file.

      J JonBJ 2 Replies Last reply
      0
      • Kent-DorfmanK Kent-Dorfman

        forget everything your college professor told you about how evil root logins are and log in directly as root, then try running the debugger. sudo will only half palf thru the required environment needed for the Qt tools...without extensive reworking of the sudoers file.

        J Offline
        J Offline
        Josef Lintz
        wrote on last edited by
        #3

        @Kent-Dorfman I've tried that, it does in-fact work.
        However, I'd rather for that to be a last resort if possible.

        1 Reply Last reply
        0
        • Kent-DorfmanK Kent-Dorfman

          forget everything your college professor told you about how evil root logins are and log in directly as root, then try running the debugger. sudo will only half palf thru the required environment needed for the Qt tools...without extensive reworking of the sudoers file.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @Kent-Dorfman
          The problem then is not the action of the debugger part of Creator acting as sudo. It solves the original debugging problem, but now means that development/file editing etc. also takes place as sudo, which is not good....

          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