Launching Debugger as sudo doesn't work
-
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 1668gnome-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
-
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.
-
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.
@Kent-Dorfman I've tried that, it does in-fact work.
However, I'd rather for that to be a last resort if possible. -
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.
@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....