forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user