Skip to content

Commit

Permalink
fix: [debugger] An abnormal prompt message occurs when terminating de…
Browse files Browse the repository at this point in the history
…bugging

Log: 1.cmake :Multiple prompts 2.python : no prompt
  • Loading branch information
LiHua000 authored and deepin-mozart committed Aug 5, 2024
1 parent 0bcfa11 commit bba8a6e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/plugins/debugger/dap/dapdebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,10 @@ void DAPDebugger::registerDapHandlers()

if (event.reason == "exited") {
d->threads.removeOne(event.threadId);
if (d->threads.isEmpty())
if (d->threads.isEmpty()) {
printOutput(tr("\nThe debugee has Terminated.\n"), OutputPane::OutputFormat::NormalMessage);
updateRunState(kNoRun);
}
}
});

Expand Down Expand Up @@ -774,7 +776,7 @@ void DAPDebugger::handleEvents(const dpf::Event &event)
auto prjInfo = event.property("projectInfo").value<dpfservice::ProjectInfo>();
if (d->projectInfo.isSame(prjInfo)) {
d->activeProjectKitName.clear();
updateRunState(kNoRun);
abortDebug();
}
} else if (event.data() == editor.switchedFile.name) {
QString filePath = event.property(editor.switchedFile.pKeys[0]).toString();
Expand Down Expand Up @@ -1203,9 +1205,6 @@ void DAPDebugger::updateWatchingVariables()

void DAPDebugger::exitDebug()
{
//abort debugger
abortDebug();

// Change UI.
editor.removeDebugLine();
d->variablesPane->hide();
Expand Down

0 comments on commit bba8a6e

Please sign in to comment.