Where are core dumps written on Mac?

It seems they are suppressed by default. Running

$ ulimit -c unlimited

Will enable core dumps for the current terminal, and it will be placed in /cores as core.PID. When you open a new session, it will be set to the default value again.


On macOS, your crash dumps are automatically handled by Crash Reporter.

You can find backtrace files by executing Console and going to User Diagnostic Reports section (under 'Diagnostic and Usage Information' group) or you can locate them in ~/Library/Logs/DiagnosticReports.

You can also check where dumps are generated by monitoring system.log file, e.g.

tail -f /var/log/system.log | grep crash

The actual core dump files you can find in /cores.

See also:

  • How to generate core dumps in Mac OS X?
  • Technical Note TN2118: Kernel Core Dumps.

Additionally, the /cores directory must exist and the user running the program must have write permissions on it.


The answer above,

ulimit -c unlimited

works -- but be sure to run that in the same terminal from which you will run the program that dumps core. You need to run the ulimit command first.