Debugging a plugin and gui update


Hi all, I was wondering if anyone had any tips for debugging a plugin?  I thought about displaying some values to the gui, but I'm not sure if that is the best option. If anyone has any ideas let me know, that would be great. Also, I understand that if trying to update the gui, it should be done with the changebroadcaster, and then you might have to call repaint(). If this is done, it says that the gui still may not update right away. So I was wondering, how do some of the plugins that I have seen, like Omnisphere arp; have steps that lightup as the sound is playing. It seems to get that type of behavior you would have to have the gui update itself quite often. Thanks.