| 526 | } |
| 527 | |
| 528 | void DAPDebugger::jumpToLine(const QString &filePath, int lineNumber) |
| 529 | { |
| 530 | if (!d->currentSession) |
| 531 | return; |
| 532 | |
| 533 | dap::Source source; |
| 534 | source.path = filePath.toStdString(); |
| 535 | |
| 536 | if (d->runState == kStopped || d->runState == kRunning) { |
| 537 | auto response = d->currentSession->gotoTargets(source, lineNumber, 0); |
| 538 | for (auto target : response.value().targets) { |
| 539 | if (target.label == QString("%1:%2").arg(filePath, QString::number(lineNumber)).toStdString()) { |
| 540 | d->currentSession->goto_(d->threadId, target.id); |
| 541 | } |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | void DAPDebugger::runToLine(const QString &filePath, int lineNumber) |
| 547 | { |
no test coverage detected