Saturday 10 January 2015

Debugging Vst Plugins Using Codeblocks...

Vst plugins are .dll files and so they need a host application to debug. The best application I have seen for doing this with using C++ is Codeblocks as the editor, with an application like Reaper. When you hit a breakpoint, control is transferred back to Codeblocks and Reapers threads and audio goes off while you are single stepping the code.

The steps to do this debugging of Vst and Vsti plugins are...

1) Get your Vst plugin going as a C++ or better C++11 project in Codeblocks.
2) In Codeblocks, there is a top level menu called "Projects". In this menu is an item called "Set Programs Arguments".
3) Go to the programs arguments panel and enter the full path to the Vst host such as  Reaper.exe(Or any other Vst host as well but Reaper works well and is free to try for this purpose).
4) Now build the program and then hit the debug button on the toolbar. The Vst host will run. Load your plugin into the host. In Reaper this means add it as an instrument or effect in the track.
5) Any breakpoints you have set in your Vst source code will now be hit when the plugin runs and you can debug the plugin like normal program debugging and do things like evaluating variables etc...

I do not know if the default compiler with Codeblocks will work well for this, because I downloaded a different newer MingW(Gcc 4.9), and I changed the Gcc path to the new MingW.




No comments:

Post a Comment