| 1347 | } |
| 1348 | |
| 1349 | void BreakpointView::toggleBreakpoint() |
| 1350 | { |
| 1351 | // qCDebug(kateBreakpoint, "%s", __FUNCTION__); |
| 1352 | |
| 1353 | if (m_backend->debuggerRunning() && !m_backend->canContinue()) { |
| 1354 | m_backend->slotInterrupt(); |
| 1355 | } else { |
| 1356 | if (!m_mainWindow) { |
| 1357 | return; |
| 1358 | } |
| 1359 | |
| 1360 | KTextEditor::View *editView = m_mainWindow->activeView(); |
| 1361 | if (!editView) { |
| 1362 | return; |
| 1363 | } |
| 1364 | QUrl currURL = editView->document()->url(); |
| 1365 | if (!currURL.isValid()) { |
| 1366 | return; |
| 1367 | } |
| 1368 | |
| 1369 | int line = editView->cursorPosition().line() + 1; |
| 1370 | setBreakpoint(currURL, dap::SourceBreakpoint(line), {}); |
| 1371 | addOrRemoveDocumentBreakpointMark(currURL, line, m_breakpointModel->hasBreakpointAtLine(currURL, line)); |
| 1372 | } |
| 1373 | } |
| 1374 | |
| 1375 | void BreakpointView::slotBreakpointsSet(const QUrl &file, const QList<dap::Breakpoint> &breakpoints) |
| 1376 | { |
no test coverage detected