Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlnativedebugservice.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQML_NATIVE_DEBUG_SERVICE_H
5#define QQML_NATIVE_DEBUG_SERVICE_H
6
7#include <private/qqmldebugconnector_p.h>
8#include <private/qv4debugging_p.h>
9#include <private/qv4engine_p.h>
10#include <private/qv4debugging_p.h>
11#include <private/qv4script_p.h>
12#include <private/qv4string_p.h>
13#include <private/qv4objectiterator_p.h>
14#include <private/qv4identifierhash_p.h>
15#include <private/qv4runtime_p.h>
16#include <private/qqmldebugserviceinterfaces_p.h>
17
18#include <QtCore/qjsonarray.h>
19
20#include <qqmlengine.h>
21
22#include <QJsonArray>
23#include <QJsonDocument>
24#include <QJsonObject>
25#include <QJsonValue>
26#include <QPointer>
27
29
30class NativeDebugger;
32
34{
35public:
36 QQmlNativeDebugServiceImpl(QObject *parent);
37
39
40 void engineAboutToBeAdded(QJSEngine *engine) override;
41 void engineAboutToBeRemoved(QJSEngine *engine) override;
42
43 void stateAboutToBeChanged(State state) override;
44
45 void messageReceived(const QByteArray &message) override;
46
47 void emitAsynchronousMessageToClient(const QJsonObject &message);
48
49private:
50 friend class NativeDebugger;
51
52 QList<QPointer<NativeDebugger> > m_debuggers;
53 BreakPointHandler *m_breakHandler;
54};
55
56QT_END_NAMESPACE
57
58#endif // QQML_NATIVE_DEBUG_SERVICE_H
void setBreakOnThrow(bool onoff)
void enableBreakPoint(int id, bool onoff)
QVector< BreakPoint > m_breakPoints
void handleRemoveBreakpoint(QJsonObject *response, const QJsonObject &arguments)
void handleSetBreakpoint(QJsonObject *response, const QJsonObject &arguments)
Collector(QV4::ExecutionEngine *engine)
void collect(QJsonArray *output, const QString &parentIName, const QString &name, const QV4::Value &value)
QV4::ExecutionEngine * m_engine
bool isExpanded(const QString &iname) const
void maybeBreakAtInstruction() override
void aboutToThrow() override
void handleCommand(QJsonObject *response, const QString &cmd, const QJsonObject &arguments)
QV4::ExecutionEngine * engine() const
NativeDebugger(QQmlNativeDebugServiceImpl *service, QV4::ExecutionEngine *engine)
void leavingFunction(const QV4::ReturnedValue &retVal) override
void enteringFunction() override
bool pauseAtNextOpportunity() const override
void signalEmitted(const QString &signal)
void stateAboutToBeChanged(State state) override
void engineAboutToBeRemoved(QJSEngine *engine) override
void engineAboutToBeAdded(QJSEngine *engine) override
void emitAsynchronousMessageToClient(const QJsonObject &message)
void messageReceived(const QByteArray &message) override
static void setError(QJsonObject *response, const QString &msg)
static QString encodeFrame(QV4::CppStackFrame *f)
size_t qHash(const BreakPoint &b, size_t seed=0) noexcept
bool operator==(const BreakPoint &a, const BreakPoint &b)
static void decodeFrame(const QString &f, QV4::CppStackFrame **frame)
#define TRACE_PROTOCOL(x)