Skip to content
Snippets Groups Projects
Commit 95b06415 authored by Olivier Goffart's avatar Olivier Goffart
Browse files

QML Debugger: Restore the ability to set breakpoint on all files.

The agent is only attached when creator request it.  But this may occurs
After some scripts have been initialized. Which mean we do not get the
scriptLoad call.
parent 2785f013
No related branches found
No related tags found
No related merge requests found
......@@ -130,12 +130,16 @@ void JSDebuggerAgent::positionChange(qint64 scriptId,
// check breakpoints
if (!breakpointList.isEmpty()) {
QHash<qint64, QString>::const_iterator it = filenames.constFind(scriptId);
if (it != filenames.constEnd()) {
QPair<QString, qint32> key = qMakePair(*it, lineNumber);
if (breakpointList.contains(key)) {
stopped();
return;
}
if (it == filenames.constEnd()) {
// It is possible that the scripts are loaded before the agent is attached
QString filename = QUrl(QScriptContextInfo(engine()->currentContext()).fileName()).toLocalFile();
QPair<QString, qint32> key = qMakePair(filename, lineNumber);
it = filenames.insert(scriptId, filename);
}
QPair<QString, qint32> key = qMakePair(*it, lineNumber);
if (breakpointList.contains(key)) {
stopped();
return;
}
}
......
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