From c84073e5cfe4e3cdb2e0aaff159302e846e45a71 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 2 Nov 2022 00:47:09 +0100 Subject: [PATCH] Print reversible command debug output Debug builds will assert, the PBD::warning will not be readable anywhere after that, so long it to stderr. --- libs/ardour/session_state.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 3f438bc592..89b33e4074 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -3288,7 +3288,11 @@ void Session::begin_reversible_command (GQuark q) { if (_current_trans) { +#ifndef NDEBUG + cerr << "An UNDO transaction was started while a prior command was underway. Aborting command (" << g_quark_to_string (q) << ") and prior (" << _current_trans->name() << ")" << "\n"; +#else PBD::warning << "An UNDO transaction was started while a prior command was underway. Aborting command (" << g_quark_to_string (q) << ") and prior (" << _current_trans->name() << ")" << endmsg; +#endif abort_reversible_command(); assert (false); return;