<p>A colleague once told me that the last option when everything has failed to debug on Linux was to use <a href="http://man7.org/linux/man-pages/man1/strace.1.html" rel="noreferrer">strace</a>.</p>

<p>I tried to learn the science behind this strange tool, but I am not a system admin guru and I didn’t really get results.</p>

<p>So,</p>

<ul>
<li>What is it exactly and what does it do?</li>
<li>How and in which cases should it be used?</li>
<li>How should the output be understood and processed?</li>
</ul>

<p>In brief, <em>in simple words</em>, how does this stuff work?</p>

strace lists all
system calls
done by the process it's applied to.  If you don't know what system calls mean, you won't be able to get much mileage from it.
Nevertheless, if your problem involves files or paths or environment values, running strace on the problematic program and redirecting the output to a file and then grepping that file for your path/file/env string may help you see what your program is
actually
attempting to do, as distinct from what you expected it to.