MCPcopy Create free account
hub / github.com/KDE/kate / toggleBreakpoint

Method toggleBreakpoint

addons/gdbplugin/breakpointview.cpp:1349–1373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1347}
1348
1349void 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
1375void BreakpointView::slotBreakpointsSet(const QUrl &file, const QList<dap::Breakpoint> &breakpoints)
1376{

Callers 2

setBreakpointMethod · 0.45

Calls 10

SourceBreakpointClass · 0.85
urlMethod · 0.80
documentMethod · 0.80
hasBreakpointAtLineMethod · 0.80
debuggerRunningMethod · 0.45
canContinueMethod · 0.45
slotInterruptMethod · 0.45
activeViewMethod · 0.45
isValidMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected