The picoC program block would turn on and off one of its own outputs using "setoutput(int output,float value);". That in turn can switch on and off anything else by connecting it in the visual designer as you would connect any Loxone logic.
Testing and debugging is very limited. You can't run it except on the miniserver. The documentation recommends you have a backup memory card prior to adding new picoC. I think that very good advice. Once on the mini server you can trace inputs and outputs as you do any other Loxone logic. When debugging/tracing you can add extra statements placing intermediate values on unused outputs to help you trace what is going on. But not easy by any means.