diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp
index 8a34cd148cacb1af8fc337de47636cb43e5ab498..1cd0ed0ef23dd31a025301bd17f83429c29e267b 100644
--- a/src/tools/idc/main.cpp
+++ b/src/tools/idc/main.cpp
@@ -139,6 +139,8 @@ static bool runWithQtInEnvironment(const QString &cmd)
     }
     CloseHandle(pi.hThread);
     CloseHandle(pi.hProcess);
+    if (exitCode)
+        fprintf(stderr, "\"%s\" returned exit code: %ul\n", qPrintable(cmd), exitCode);
     return exitCode == 0;
 }