How can I track/debug my scripts?

Heh, this is a giant pain because I'm not quite sure what to call what I'm asking for... I'm still new to scripting and mostly self-taught, so I'm not up to speed on the jargon, please bear with me here.

Basically, what I'm wondering is if there is any kind of debug/tracker type thing that I can either

a) Print debug strings to? (IE: if (x=y){print("It worked!"); //the actual task})

b) Track the content of variables?

Any help appreciated!


PS: I'm just asking a question here, if it's somehow offensive to you, just move on, don't answer with stupid crap. If you think I need to read something, tell me what it is and why I should bother with it. I've looked at the official references, so if I missed something there I need something more specific than just the link to the main topics page. That's plain useless. Thanks!

Check out Debug.Log. The Debug class has some other helpful things like drawing lines and pausing the editor.