REPL
From Unify Community Wiki
This is a tool to give you a Read Eval Print Loop in Unity, based on Miguel De Icaza's tool.
What is a REPL? See the Wikipedia article.
Caveats: At present there's no edit history, neither variables nor output history survive assembly reloads, output formatting is weak and not all output sources are captured gracefully and -- well, there's quite a lot of caveats but the tool is entirely usable and useful!
The Code
Import this package into your project and go to Window -> REPL -> Shell.