1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef JSDEBUGGER_H |
6 | #define JSDEBUGGER_H |
7 | |
8 | #include "debugger/debugger.h" |
9 | |
10 | #include <QObject> |
11 | |
12 | class JSDebuggerPrivate; |
13 | class JSDebugger : public Debugger |
14 | { |
15 | Q_OBJECT |
16 | public: |
17 | explicit JSDebugger(QObject *parent = nullptr); |
18 | ~JSDebugger(); |
19 | |
20 | QString program() override; |
21 | QStringList preArguments() override; |
22 | |
23 | QString quit() override; |
24 | QString kill() override; |
25 | |
26 | QString breakInsert(const QString& path) override; |
27 | QString breakRemove(int bpid) override; |
28 | QString breakRemoveAll() override; |
29 | |
30 | QString launchLocal() override; |
31 | |
32 | QString commandPause() override; |
33 | QString commandContinue() override; |
34 | QString commandNext() override; |
35 | QString commandStep() override; |
36 | QString commandFinish() override; |
37 | |
38 | QString stackListFrames() override; |
39 | QString stackListVariables() override; |
40 | |
41 | QString threadInfo() override; |
42 | QString threadSelect(const int threadId) override; |
43 | |
44 | QString listSourceFiles() override; |
45 | |
46 | dap::array<dap::StackFrame> allStackframes() override; |
47 | dap::array<dap::Thread> allThreadList() override; |
48 | dap::array<dap::Variable> allVariableList() override; |
49 | |
50 | void handleOutputRecord(const QString &text) override; |
51 | void handleOutputStreamText(const QString &streamText) override; |
52 | |
53 | void parseBreakPoint(const QVariant& var) override; |
54 | void removeBreakPoint(const int bpid) override; |
55 | void clearBreakPoint() override; |
56 | QList<int> breakpointsForFile(const QString &filePath) override; |
57 | |
58 | bool isInferiorRunning() override; |
59 | |
60 | signals: |
61 | void asyncStopped(const dap::StoppedEvent &stoppedEvent); |
62 | |
63 | public slots: |
64 | |
65 | private: |
66 | JSDebuggerPrivate *const d; |
67 | }; |
68 | |
69 | #endif // JSDEBUGGER_H |
70 |