Skip to content
Snippets Groups Projects
Commit 50b6a98b authored by Kai Koehne's avatar Kai Koehne
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -597,6 +597,12 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu ...@@ -597,6 +597,12 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
sp.projectBuildDir = runConfiguration->target() sp.projectBuildDir = runConfiguration->target()
->activeBuildConfiguration()->buildDirectory(); ->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:") Utils::QtcProcess::addArg(&sp.processArgs, QLatin1String("-qmljsdebugger=port:")
+ QString::number(sp.qmlServerPort)); + QString::number(sp.qmlServerPort));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment