Commit 50b6a98b authored by Kai Koehne's avatar Kai Koehne

Debugger: Ensure breakpoints to simple JS expressions are hit

Prevent QDeclarativeEngine to handle simple bindings on their own by
setting the QML_DISABLE_OPTIMIZER environment variable. This ensures
that every binding is actually updated through the JavaScript engine,
and therefore checked for breakpoints.

Task-number: QTCREATORBUG-3595
parent 028776ce
......@@ -597,6 +597,12 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
sp.projectBuildDir = runConfiguration->target()
->activeBuildConfiguration()->buildDirectory();
// Makes sure that all bindings go through the JavaScript engine, so that
// breakpoints are actually hit!
if (!sp.environment.hasKey(QLatin1String("QML_DISABLE_OPTIMIZER"))) {
sp.environment.set(QLatin1String("QML_DISABLE_OPTIMIZER"), QLatin1String("1"));
}
Utils::QtcProcess::addArg(&sp.processArgs, QLatin1String("-qmljsdebugger=port:")
+ QString::number(sp.qmlServerPort));
}
......
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