Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to enable core dump in Fish

📅 2014-May-08 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

When a program crashes due to segmentation fault, then its core dump file is useful to debug the problem. However, when you execute such a program under Fish, it does not create a core file. This is because core dump is disabled by default in Fish. You can check this by using the ulimit command:

$ ulimit -c
0

The output of 0 means that core dump has been disabled.

To enable it you can pass the maximum size of the core file which Fish should allow to be dumped (in KB). If you want to dump core no matter how large the file:

$ ulimit -c unlimited

If you want this setting to be enabled by default, add the above line to your ~/.config/fish/functions/config.fish file. More information on the ulimit command can be found here.

Tried with: Fish 2.0.0 and Ubuntu 14.04