<p>What is the best way for me to determine a controller variable's value during execution?</p>

<p>For example, is there a way I can insert a break in the code, and cause the value of the variable to be output to the screen (or the log)?</p>

Yes. The easiest way is to raise the value as a string. Like so:
```
raise @foo.to_s
```
Or, you can install the debugger (
```
gem install ruby-debug
```
), and then start the development server with the
```
--debugger
```
flag. Then, in your code, call the
```
debugger
```
instruction.
Inside the debugger prompt, you have many commands, including
```
p
```
to print the value of a variable.
Update:
here's
a bit more about ruby-debug
.