how do I get diagnostic output

I have a stupid problem and I cant for the life of me figgure out why. need to see the value of some variables. how do I get output?

I tried looking at vcv notes but couldnt find the code

thanks

1 Like

Not sure if this is what you are asking about, but here are two ways to print to the log in Rack:

DEBUG("value %i", val);
INFO("value %i", val);

The syntax is like printf().

2 Likes

I’m not an expert, but beside printing some text to the output log of VCV (as said by marc_boule); I also find useful these methods:

  1. add one of more debug outputs DBG1_OUTPUT, DBG2_OUTPUT, ... and set their values (setVoltage()) in the process() function; so I can monitor them both using the oscilloscope and/or using a module that shows their voltage values

I put their definition/handling in a conditional define #ifdef DBG ... #endif so I can quickly remove them in the final release.

  1. format the debug strings ( sprintf() ) and use an extra button in the panel to copy their content to the clipboard

I also tried to have a build environment in which I can debug the code directly in the IDE, but no luck until now (in Windows 7 I tried with netbeans, perhaps Visual Studio is more easy to configure).

2 Likes

I think some people have done that. I think the vast majority of us using the recommended MSYS2 command line for building. I do have a Visual Studio project for building and debugging my unit test app along with most of the plugin, but for the plugin proper I just use the command line.

I really like these 2 options, how do I output to the clipboard?

glfwSetClipboardString(APP->window->win, "Hello world!");

thanks, that looks easy but I should mention I am running ubuntu and I fear the ->win part will work out to a ->lose :frowning:

I’m pretty sure that’s portable code that will work on all of Rack’s platforms.

1 Like