Ever find yourself stuck debugging an application because the UI is just doing something weird that you can’t track down? Maybe a widget isn’t appearing correctly, or you just need more information about the overall structure and logging statements aren’t doing you much good. Debugging complex UIs can be a pain.
We’ve had some real challenges at VMware, due to the complexity of our applications. It was enough to drive me mad one day, so rather than write more logging statements, I wrote Parasite.
Parasite is a debugging tool that David Trowbridge and I have been working on to give developers an interactive view of their entire application’s UI. It provides a number of really useful features, including:
- See the entire widget hierarchy of your UI.
- Watch properties update live.
- Modify existing properties on a widget.
- View all registered GtkActions.
- Toggle GTK+’s debugging of graphic updates.
- Inject custom code while the application is running.
Yes, you can inject new code into an application. With Python. Parasite runs in-process as a GTK+ module, so it has access to some internals of your application. We provide a Python shell equipped with PyGTK support for creating and modifying your UI on-the-fly, regardless of the language it was written in. Handy when you want to test out new concepts for a UI without writing new C code.
David has a nice screencast available showing some of what Parasite can do.
For more information on Parasite, including screenshots, a mailing list, and where to get the source code, see the Parasite homepage.
Awesome, GLE reborn. You do know about GLE right?
http://svn.gnome.org/viewvc/gle/trunk/
Maybe I’m wrong, but I don’t think GLE and Parasite have the same goals. It also doesn’t look like GLE is in development anymore or provides the Python integration or action lists we use.
Yes, GLE is long dead. There does seem to be a good chunk of overlap with regards to features, which I guess amuses me more than anything.
The Python stuff in Parasite sounds especially rockin’.
Congrats to this release. That’s just awesome. Especially the part that it’s so easy to use.
@Manish: I’ll have to look more into GLE, see if there’s anything useful we can port over.
The Python stuff is definitely fun 🙂 We were having a great time just finding ways to modify existing apps. I plan to add functionality for saving/loading scripts later on.
A really great tool… have been searching for something like this. It would be great if you could add the section “Using Parasite” from http://code.google.com/p/gtkparasite/ – I searched some time until I found how to use it.
This is really neat. I think it helps developing GTK+2 interfaces a lot!
Thanks.
Excellent tool.
Could you consider _really_ adding some usage info to http://chipx86.github.com/gtkparasite/? At http://code.google.com/p/gtkparasite/ it only asks me to log in…
Yeah, I’m adding it right now actually. You should see it pretty soon.
Usage instructions are added.
Holy shit this is awesome.
My project (Anomos) is a fork from an existing GTK program (BitTorrent), and I’ve never used GTK before but need to redesign the inherited GUI. This makes learning GTK much less intimidating for me and is a very helpful concept for doing redesign.
My hat is off to you, sir! You rock – keep up the good work.
Can this be used as a way of doing quick and dirty automated control of a gui program?
Wow, found this via the Ars article. After seeing the huge gains provided by using tools like this for development on the Windows platform I had often wondered if something similar could be developed for GTK/Linux. I have had my answer delivered in impressive form. This would have been a remarkable tool even if it had been nothing more than an interface property investigator, but the added ability to modify a running interface really puts in an entirely different league in terms of its usefulness for prototyping and for inferring best practices from existing applications–the latter being an especially pragmatic thing for a platform that prides itself on cleanliness and consistency. I love it and I hope you continue to develop it as long as you can.
Cheers,
Bouvard
What a great tool! I will most certainly be putting this to good use.
Thank you!