Output from script?

Hello

I’m new to this forum aswell as to unity, just evaluating the indie unity version and i have a quick questions which i couldn’t solve by searching the forum so far:

Is there a possibility to get some output from a script? I just want to check wether a certain bit of code behind an “IF”-command is executed at all and what value was making the deciding factor in the comparison…

cheers
Oliver

bool canWeDoThat = true;
if (canWeDoThat)
   Debug.Log("Can we do that? " + canWeDoThat);

Thanks a lot!