Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
888 views
in Technique[技术] by (71.8m points)

macos - How to enable full coredumps on OS X?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...