Sometimes you need to see what an application is doing under the hood — what files it’s opening, what system calls it’s making, or what data it’s writing. Here’s a quick note on the tools for that.

On Linux, you’re probably looking for dtrace (or more commonly strace, which is easier to use for most cases). Run it like this:

strace -f -o output.log ./your-application

If you’re on a Mac, then you’re probably looking for dtruss, which is the macOS equivalent:

sudo dtruss ./your-application

strace on Linux is generally the go-to for this kind of debugging. It shows you every system call the process makes, which is invaluable when an app is failing silently or behaving unexpectedly. The -f flag follows child processes too, which is useful for apps that fork.