if it is K# there is no debug except the good old console output.
K# supports console output using the print(<expressions>)
or println(<expressions>)
syntax. This is useful if you want to output current values during cycle iterations without the need to declare a variable where values would be stored in each iteration and returned in the end.
Console output has higher priority than standard output of an expression, as you can see in the example below.
// returns "2345678910", the "ignore" string at the end is ignored as console output has higher priority
{% z = 1; while (z < 10) {print(++z)}; "ignored" %}