Idiots Guide To Plugin Troubleshooting

I’m a newb. I’m breaking relatively neanderthal plugins constantly.

For the most part, I have almost no clue as to how to troubleshoot my flawed plugins. Is there an overall guide/blog/book/etc somewhere that will help get me started?

Brandon

Are you using an IDE? If I recall, you’re on Windows right? Well, I’ve only ever done development on a Mac (Xcode) but I can give you some general tips that might be applicable to Visual Studio if you can get it set up correctly.

The most useful single thing I’ve done, and I hope this is possible on VS because it really helps, is to set up my build environment so that when I compile my plugin, Xcode automatically launches my host, and I can then immediately open an instance of my plugin. Not only is this convenient, but crucially the plugin is now running in debug mode, as (I’m guessing) a child process of Xcode. This allows you to do the following things that make debugging 100x easier:

[list]
[]Set breakpoints & use the visual debugger.
[/
]
[]Use std::cout to log interesting values to the console.
[/
]
[]Add jassert() statements. These are like ‘sanity checks’ that are ignored when you compile your release build (so no performance cost) but which will pause your program if they get an input that evaluates to ‘false’ in your debug build version.[/][/list]

Even with all these at your disposal, you will probably still end up tearing your hair out on multiple occasions due to incomprehensible bugs. It’s just the nature of the beast I’m afraid… :roll: