This project has moved and is read-only. For the latest updates, please go here.

How to debug?

Mar 15, 2010 at 4:21 PM

How can I use the debugging features of Visual Studio with the VST plgugins?

I always build, open the host, load the plugin and use MessageBox to trace out some variables.
Is there a way I can test the plugins with breakpoints and all the other debugging features?

Mar 15, 2010 at 5:17 PM

You attach the debugger (Visual Studio->Debug menu->Attach to process) to the host process (application) you load your plugin in. You can even specify it on the debug command line (project properties).

I have sometimes found that the application is not bound to the debugger for managed code (only x86) and setting a breakpoint in managed code is never hit. Sometimes it helps to load some managed code (a dummy plugin that always works) before you attach the debugger...

Hope it helps.

Mar 15, 2010 at 5:26 PM

You can also trace the method calls in the Interop. Look at the app.config in the Interop project for an example. Rename the config to the name of the host application (vsthost.exe.config) and replace the placeholder (between []) for the name of your plugin (name of the renamed interop assembly without file extension). You can use DebugView to see the traces or attach VS.