read the transcript!
Error messages are a goldmine of information, but they can be very annoying to read:
(image of an error message, represented by a stack of squiggly lines, with 2 notes pointing to it): - giant 50 line stack trace full of impenetrable jargon, often seems totally unrelated to your bug - can even be misleading, like “permission denied” sometimes means “doesn’t exist”
Tricks to extract information from giant error messages:
- If there are many different error messages, start with the first one. Fixing it will often fix the rest.
- If the end of a long error message isn’t helpful, try looking at the beginning (scroll up!)
- On the command line, pipe it to
less so that you can scroll/search it
(./my_program 2>&1 | less)
Note: if you don’t include
less won’t show you the error messages (just the output)