HN2new | past | comments | ask | show | jobs | submitlogin

For the non-web (and sometimes even for the web) programmer, strace can be a real life saver.

An application complains about not being able to find a file, but doesn't report where it looked for it? strace can tell.

Do you want to know why a system call failed, and the app is too crappy to report the error? strace to the rescue!

Of course, if you're lucky you might even have access to dtrace...



This mostly-web programmer finds strace and (more often) ngrep (http://linux.die.net/man/8/ngrep) to be some of the most useful tools out there for debugging errors both strange and mundane.


For me as a user, strace can be a real life saver. I'm not hep enough to the jive to read the source code and figure out what [incredibly uninformative error message regarding file access] means, but I can read strace output and see what file the executable is trying to access, and what it's trying to do to it.


My favorite strace story: trying to get at the underlying causes of some "Unexpected Error" messages in ArcGIS, and it turns out it's writing helpful and useful (albeit two decades old) logging + error messages to the Windows equivalent of /dev/null.

shakes fist @ ESRI HQ once again


Yes most definitely, strace / truss have been absolute life savers. And if you are looking for something similar on Windows Process Monitor is excellent. You can also do a lot of DTrace style stuff with WMI and VBScript.


The Windows equivalents would be the Sysinternal tools, I guess (Filemon, Procmon, etc..).

http://technet.microsoft.com/en-us/sysinternals




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: