Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable full coredumps on OS X?

Tags:

macos

coredump

It looks that OS X (10.6) does not generates codedumps by default.

Using the ulimit -c unlimited is not a good solution because ulimit does set the limit in an environment variable. This will work only for console applications executed from the shell that executed ulimit. If you have a gui application this will not work.

like image 989
sorin Avatar asked Feb 05 '10 12:02

sorin


People also ask

How do I get a crash dump on Mac?

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 .

Where are core files on Mac?

You can access the /cores folder through the Go -> Go to folder... menu, and then type "/cores." Now, trash the size-eaters, and restart. Done, happy again. [robg adds: In looking at the cores folder on my machine, I fond only one file, but it was 933mb in size (from April, 2003)!

What are core files on Mac?

The /cores folder is where OS X stores Core Dumps. These are files that are intended for developers to trouble-shoot and diagnose faults in their software. They are generated as software crashes. If you're not a developer, or aren't testing software for a developer, then these files serve no purpose for you.


1 Answers

You can enable core dumps and then launch your GUI app from the command line using open.

$ ulimit -c unlimited
$ open /Applications/Address\ Book.app

I just looked at TN2124 and it suggests a similar approach, only without using open and just launching the app directly, e.g.

$ ulimit -c unlimited
$ /Applications/TextEdit.app/Contents/MacOS/TextEdit
like image 146
Paul R Avatar answered Oct 04 '22 05:10

Paul R