MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / evaluateWatchVariable

Method evaluateWatchVariable

src/plugins/debugger/dap/dapdebugger.cpp:565–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565void DAPDebugger::evaluateWatchVariable(const QString &expression)
566{
567 IVariable var;
568 var.name = expression.toStdString();
569 var.var.name = expression.toStdString();
570
571 if (d->runState == kStopped) {
572 auto response = d->currentSession->evaluate(var.name, d->currentValidFrame.frameId, "watch");
573 var.var.value = response.value().result;
574 var.var.type = response.value().type.has_value() ? response.value().type : "";
575 var.var.variablesReference = response.value().variablesReference;
576 } else {
577 var.var.value = "";
578 var.var.type = "";
579 }
580
581 d->watchingVariables[expression] = var;
582 auto vars = d->watchingVariables.values().toVector();
583 d->watchsModel.setDatas(vars);
584}
585
586bool DAPDebugger::getLocals(dap::integer frameId, IVariables *out)
587{

Callers

nothing calls this directly

Calls 5

has_valueMethod · 0.80
valuesMethod · 0.80
evaluateMethod · 0.45
valueMethod · 0.45
setDatasMethod · 0.45

Tested by

no test coverage detected