diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index fc5c4e9ec552e1fe1c1e81abd6e18a9b83f1fdf8..0ccb78e7d05cbc69d5157c3c938bbf4c90777a37 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -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)); }