From 21ab8665c03acc478278da177b895ab620f2f138 Mon Sep 17 00:00:00 2001 From: Tomas Aparicio Date: Sat, 30 Jan 2016 14:34:01 +0000 Subject: [PATCH] feat(#72): add helpful debug info in docs --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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.