如何在OS X上启用完整的核心转储? [英] How to enable full coredumps on OS X?
问题描述
看起来OS X(10.6)默认情况下不会生成代码转储.
It looks that OS X (10.6) does not generates codedumps by default.
使用ulimit -c unlimited
不是一个好的解决方案,因为ulimit确实在环境变量中设置了限制.这仅适用于从执行ulimit的外壳执行的控制台应用程序.如果您使用的是gui应用程序,则将无法正常工作.
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.
推荐答案
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
我只是看了 TN2 提出了一种类似的方法,只是不使用open而是直接启动应用程序,例如
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
这篇关于如何在OS X上启用完整的核心转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!