8#include <private/qv4scopedvalue_p.h>
9#include <private/qv4script_p.h>
10#include <private/qqmlcontext_p.h>
11#include <private/qqmlengine_p.h>
27 return a.lineNumber ==
b.lineNumber &&
a.fileName ==
b.fileName;
34 , m_pauseRequested(
false)
35 , m_haveBreakPoints(
false)
36 , m_breakOnThrow(
false)
37 , m_returnedValue(
engine,
QV4::Value::undefinedValue())
42 static int debuggerId = qRegisterMetaType<QV4Debugger*>();
43 static int pauseReasonId = qRegisterMetaType<QV4Debugger::PauseReason>();
70 m_pauseRequested =
true;
97 m_haveBreakPoints =
true;
105 m_haveBreakPoints = !m_breakPoints.isEmpty();
112 m_breakOnThrow = onoff;
118 m_pauseRequested =
false;
131 return m_pauseRequested || m_haveBreakPoints || m_gatherSources || m_stepping >=
StepOver;
146 if (m_gatherSources) {
147 m_gatherSources->
run();
148 delete m_gatherSources;
149 m_gatherSources =
nullptr;
152 switch (m_stepping) {
165 if (m_pauseRequested) {
166 m_pauseRequested =
false;
168 }
else if (m_haveBreakPoints) {
172 if (reallyHitTheBreakPoint(
f->sourceFile(), lineNumber))
199 m_returnedValue.
set(m_engine, retVal);
223void QV4Debugger::runJobUnpaused()
231void QV4Debugger::pauseAndWait(PauseReason reason)
240 m_runningCondition.
wait(&m_lock);
252bool QV4Debugger::reallyHitTheBreakPoint(
const QString &filename,
int linenr)
256 if (
it == m_breakPoints.end())
264 m_runningJob = &evilJob;
266 m_runningJob =
nullptr;
268 return evilJob.resultAsBoolean();
274 runInEngine_havingLock(job);
277void QV4Debugger::runInEngine_havingLock(
QV4DebugJob *job)
287 m_jobIsRunning.
wait(&m_lock);
288 m_runningJob =
nullptr;
293#include "moc_qv4debugger.cpp"
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString fileName(ComponentFormattingOptions options=FullyDecoded) const
void maybeBreakAtInstruction() override
QV4::Function * getFunction() const
void enteringFunction() override
void runInEngine(QV4DebugJob *job)
void removeBreakPoint(const QString &fileName, int lineNumber)
QV4::ExecutionEngine * engine() const
void debuggerPaused(QV4Debugger *self, QV4Debugger::PauseReason reason)
QVector< QV4::StackFrame > stackTrace(int frameLimit=-1) const
void setBreakOnThrow(bool onoff)
bool pauseAtNextOpportunity() const override
void leavingFunction(const QV4::ReturnedValue &retVal) override
ExecutionState currentExecutionState() const
const QV4DataCollector * collector() const
QV4Debugger(QV4::ExecutionEngine *engine)
void aboutToThrow() override
void addBreakPoint(const QString &fileName, int lineNumber, const QString &condition=QString())
void set(ExecutionEngine *engine, const Value &value)
bool wait(QMutex *, QDeadlineTimer=QDeadlineTimer(QDeadlineTimer::Forever))
QSet< QString >::iterator it
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
BreakPoint(const QString &fileName, int line)
CppStackFrame * parentFrame() const
static constexpr ReturnedValue undefined()
CppStackFrame * currentStackFrame
StackTrace stackTrace(int frameLimit=-1) const