Equivalent of strace -feopen < command > on mac os X

Setjmp picture Setjmp · Dec 18, 2009 · Viewed 52.8k times · Source

This is useful for debugging (hence programming related). On linux, we can use the command

strace -feopen python myfile.py

to figure out which python modules and shared objects are loaded. Is there an equivalent one-liner on macOS X?

Answer

ephemient picture ephemient · Dec 18, 2009

I suppose you meant strace -fetrace=open?

dtruss -f -t open python myfile.py