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 <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-02-28 09:02:43 +01:00
parent bcfaddb473
commit 6dc4160a40

View File

@@ -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 = "<qtcreatorcdbext>|";
if (line.startsWith(creatorExtPrefix)) {
// "<qtcreatorcdbext>|type_char|token|remainingChunks|serviceName|message"