Tip for anyone reading: If you only need to trace file accesses or command executions, `eslogger lookup` and `eslogger exec` respectively will give you what you need (albeit in the form of a not-particularly-friendly JSON blob).
csrutil enable --without dtrace
(Also, you can disable it only for dtrace if you want)
$ pipx install git+https://github.com/Mic92/strace-macos
installed package strace-macos 0.1.0, installed using Python 3.13.7
These apps are now globally available
- strace
done!
$ strace df -h
Error: Failed to load LLDB Python module.
Make sure you're running with system Python (/usr/bin/python3) and have Xcode Command Line Tools installed.
To install Xcode Command Line Tools:
xcode-select --install
$ sudo strace df -h
[same shit]
After fixing[0] the awkward python system requirement, it doesn't work with built-in binaries without SIP disabled, it's really slow, it colorizes output even when piping, and the colors are terrible. Better than nothing but it's currently less effort to temporarily disable SIP for dtruss and reenable it later than install this in this early form. Maybe with time it will improve, but it seems like a vehicle to aggressively advertise consulting services.0:
env PIPX_DEFAULT_PYTHON='/usr/bin/python3' pipx install git+https://github.com/Mic92/strace-macos> it seems like a vehicle to aggressively advertise consulting services.
It's an open source tool that addresses a pain point many people have, made with someone's spare time with no strings attached. What is wrong with you?
> it doesn't work with built-in binaries without SIP disabled
You can't debug system binaries on macOS with SIP. That's the whole point of SIP. Debugging user binaries is still very much allowed.
sudo lldb /bin/ls
Password:
(lldb) target create "/bin/ls"
Current executable set to '/bin/ls' (arm64e).
(lldb) r
error: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))
> lacks pypi and brew packagingThat's an entitled complaint against a project made just 2 days ago [1], which offers a single line command for installation.
[1]: https://github.com/Mic92/strace-macos/commit/712aaf14d07f2ef...
For things that run on Linux and other Unices yes.
For macOS UI programs and those that need specific permissions and for commercial programs stick with Homebrew but you can define what you want in homebrew in nix.
sandbags•2mo ago
musicale•2mo ago