← Back to team overview

unity-dev team mailing list archive

Re: [Ayatana-dev] Debugging Unity-2d QML

 

Yes, I've been trying that, but unity-2d-spread needs to be run as root. So I
tried running qt creator as root with 'sudo qtcreator' in my current session
but that didn't work too well. Or maybe I should set the setuid bit on the
unity-2d-spread executable so it can run as root - I'm still experimenting.

It doesn't look too hard to add a menu option 'Connect to Running QML
Application..' to 'Debug ->  Start Debugging' to Qt Creator though, and I've
started doing that now too. Certainly if I need to debug unity-2d-launcher and
unity-2d-panel I'll need be able to connect to a running process anyway,
because they must be started by the gnome-session process.

Actually this does not seem correct.

First off, why do you say that you need to run spread as root ?
It should definitely not be run as root.

Second, you don't need launcher and panel to be started by the session, if all you need is to debug them. What you can do is to change the /usr/share/applications/unity-2d-launcher and change the line with the name of the executable to something that doesn't exist (to prevent the session from starting it). Then log out of your session and log in again. Press ctrl+alt+t to start a new terminal and launch qtcreator from there, then start your launcher under a debugger.

Of course if you prefer hacking qtcreator, that's great and definitely something other people can use, but it's certainly not the quickest way to debug this problem.

Cheers,
--
Ugo



Follow ups

References