From 6dc4160a404db2e0e4ec2a44168875ec60dd4067 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 28 Feb 2023 09:02:43 +0100 Subject: [PATCH] Debugger: Add warning if cdb prevents loading of cdbext This happens from time to time, but I do not have a way to reproduce it safely. In order to present the user a somewhat usable state after this error cancel the debug run and show a message box with potential fixes. Fixes: QTCREATORBUG-24323 Change-Id: I7e557001bd5dfb3b0abb19fa635bf2d20bb3b16c Reviewed-by: Christian Stenger --- src/plugins/debugger/cdb/cdbengine.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 0ecdbf8d1a5..5c5d8b1e74b 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2279,6 +2279,19 @@ void CdbEngine::parseOutputLine(QString line) while (isCdbPrompt(line)) line.remove(0, CdbPromptLength); // An extension notification (potentially consisting of several chunks) + if (!m_initialSessionIdleHandled && line.startsWith("SECURE: File not allowed to be loaded") + && line.endsWith("qtcreatorcdbext.dll")) { + CheckableMessageBox::doNotShowAgainInformation( + Core::ICore::dialogParent(), + Tr::tr("Debugger Start Failed"), + Tr::tr("The system prevents loading of %1 which is required for debugging. " + "Make sure that your antivirus solution is up to date and if that does not work " + "consider to add an exception for %1.") + .arg(m_extensionFileName), + Core::ICore::settings(), + "SecureInfoCdbextCannotBeLoaded"); + notifyEngineSetupFailed(); + } static const QString creatorExtPrefix = "|"; if (line.startsWith(creatorExtPrefix)) { // "|type_char|token|remainingChunks|serviceName|message"