Commit 36b638d9 authored by Olivier Goffart's avatar Olivier Goffart
Browse files

QML JS Debugger: support the debugger statement

parent 3abe2884
......@@ -273,13 +273,11 @@ void JSDebuggerAgent::positionChange(qint64 scriptId,
}
}
switch (state) {
case NoState:
case Stopped:
// Do nothing
break;
case SteppingOutState:
if (stepDepth >= 0)
break;
......@@ -318,6 +316,22 @@ void JSDebuggerAgent::exceptionCatch(qint64 scriptId,
Q_UNUSED(exception);
}
bool JSDebuggerAgent::supportsExtension(QScriptEngineAgent::Extension extension) const
{
return extension == QScriptEngineAgent::DebuggerInvocationRequest;
}
QVariant JSDebuggerAgent::extension(QScriptEngineAgent::Extension extension, const QVariant& argument)
{
if (extension == QScriptEngineAgent::DebuggerInvocationRequest) {
stopped();
return QVariant();
}
return QScriptEngineAgent::extension(extension, argument);
}
void JSDebuggerAgent::messageReceived(const QByteArray& message)
{
QDataStream ds(message);
......
......@@ -93,9 +93,9 @@ public:
void exceptionCatch(qint64 scriptId,
const QScriptValue &exception);
/* bool supportsExtension(Extension extension) const;
bool supportsExtension(Extension extension) const;
QVariant extension(Extension extension,
const QVariant &argument = QVariant());*/
const QVariant &argument = QVariant());
void messageReceived(const QByteArray &);
void enabledChanged(bool);
......
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