These 3 builtin bash variables will definitely make your life easier when it comes to debugging your script. Especially when they contain a lot of functions that are calling each other. Together they will give you a stack backtrace and the location of each function call.
“But why?”, you might ask. Well, it may happen that when running a CPU intensive program, like encoding a film, your laptop gets so hot that it decides to give up and shut down in the middle of the process. The following is the method I use, so far with great success, to lower my laptop’s CPU temperature.