diff --git a/README.md b/README.md index 60d6c17..52e0d88 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,21 @@ Enable libvips traces (note that a lot of data will be written in stdout): VIPS_TRACE=1 ./app ``` +You can also dump a core on failure, as [John Cuppit](https://github.com/jcupitt) said: +```c +g_log_set_always_fatal( + G_LOG_FLAG_RECURSION | + G_LOG_FLAG_FATAL | + G_LOG_LEVEL_ERROR | + G_LOG_LEVEL_CRITICAL | + G_LOG_LEVEL_WARNING ); +``` + +Or set the G_DEBUG environment variable: +``` +export G_DEBUG=fatal-warnings,fatal-criticals +``` + ## API See [godoc reference](https://godoc.org/github.com/h2non/bimg) for detailed API documentation.