Commit 7ab6e345 authored by Oliver Wolff's avatar Oliver Wolff Committed by hjk

Support debug requests from Task Manager

If debugging was started from Task Manager Windows does
not follow the format given in the registry but always uses
"<debugger> -p <pid>".

By ignoring the -p parameter and using "debug" instead of
"wincrashevent" we can also support this use case from QtC's

The message which is shown in this case will be adapted as
soon as this change hits master but with the current approach
the situation is greatly improved for 4.4.

Task-number: QTCREATORBUG-18194
Change-Id: I871a19f0cd68f61337d1e6c224ecc3c22a02c989
Reviewed-by: default avatarRobert Loehning <>
Reviewed-by: default avatarhjk <>
parent 89dbe978
......@@ -102,6 +102,8 @@ static bool parseArguments(const QStringList &args, QString *errorMessage)
optIsWow = true;
} else if (arg == QLatin1String("nogui")) {
noguiMode = true;
} else if (arg == QLatin1String("p")) {
// Ignore, see QTCREATORBUG-18194.
} else {
*errorMessage = QString::fromLatin1("Unexpected option: %1").arg(arg);
return false;
......@@ -282,8 +284,13 @@ bool startCreatorAsDebugger(bool asClient, QString *errorMessage)
// Send to running Creator: Unstable with directly linked CDB engine.
if (asClient)
args << QLatin1String("-client");
args << QLatin1String("-wincrashevent")
<< QString::fromLatin1("%1:%2").arg(argWinCrashEvent).arg(argProcessId);
if (argWinCrashEvent != 0) {
args << QLatin1String("-wincrashevent")
<< QString::fromLatin1("%1:%2").arg(argWinCrashEvent).arg(argProcessId);
} else {
args << QLatin1String("-debug")
<< QString::fromLatin1("%1").arg(argProcessId);
if (debug)
qDebug() << binary << args;
QProcess p;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment