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 QV4DEBUGGING_H
5#define QV4DEBUGGING_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQml/private/qv4global_p.h>
19#include <QtQml/private/qv4staticvalue_p.h>
20#include <QtCore/qobject.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace QV4 {
25namespace Debugging {
26
27#if !QT_CONFIG(qml_debug)
28
29class Debugger
30{
31public:
32 bool pauseAtNextOpportunity() const { return false; }
33 void maybeBreakAtInstruction() {}
34 void enteringFunction() {}
35 void leavingFunction(const ReturnedValue &) {}
36 void aboutToThrow() {}
37};
38
39#else
40
41class Q_QML_EXPORT Debugger : public QObject
42{
43 Q_OBJECT
44
45public:
46 ~Debugger() override;
47 virtual bool pauseAtNextOpportunity() const = 0;
48 virtual void maybeBreakAtInstruction() = 0;
49 virtual void enteringFunction() = 0;
50 virtual void leavingFunction(const ReturnedValue &retVal) = 0;
51 virtual void aboutToThrow() = 0;
52};
53
54#endif // QT_NO_QML_DEBUGGING
55
56} // namespace Debugging
57} // namespace QV4
58
59QT_END_NAMESPACE
60
61#endif // QV4DEBUGGING_H
62

source code of qtdeclarative/src/qml/jsruntime/qv4debugging_p.h