ptrace (process trace) is a system call found in Unix and Unix-like operating systems such as Linux. ptrace provides the means for a program to patch running programs, avoid unfixed bugs, and as a debugger.
https://man7.org/linux/man-pages/man2/ptrace.2.html