How to enable core dump in Fish

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.