...

/

Debugging Using the Output to the Console

Debugging Using the Output to the Console

Learn to debug a Ruby program using the output to our console.

The inspect method

This is one of the easiest and most efficient ways to debug a program.

puts something.inspect

We can implement the inspect method for every object in any part of a program. It then returns a string representation of the object. Here, we may ask why we need ...