Infect your application with Parasite!

Parasite

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.

15 thoughts on “Infect your application with Parasite!”

    1. 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.

  1. 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’.

  2. @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.

  3. 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.

  4. 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

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top