Skip to content

Commit

Permalink
Merge pull request #43739 from NipunaRanasinghe/debugger-bp-fix-master
Browse files Browse the repository at this point in the history
Fix support for breakpoint changes inside Ballerina services during a debug session
  • Loading branch information
NipunaRanasinghe authored Jan 8, 2025
2 parents d68e66a + 94bd439 commit 6dffd69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ void restoreUserBreakpoints() {
}

context.getEventManager().deleteAllBreakpoints();
for (Map.Entry<String, LinkedHashMap<Integer, BalBreakpoint>> entry : userBreakpoints.entrySet()) {
String qClassName = entry.getKey();
context.getDebuggeeVM().classesByName(qClassName).forEach(ref -> activateUserBreakPoints(ref, false));
}
context.getDebuggeeVM().allClasses().forEach(ref -> activateUserBreakPoints(ref, false));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ void enableBreakpoints(String qClassName, LinkedHashMap<Integer, BalBreakpoint>

// Setting breakpoints to an already running debug session.
context.getEventManager().deleteAllBreakpoints();
context.getDebuggeeVM().classesByName(qClassName)
.forEach(ref -> breakpointProcessor.activateUserBreakPoints(ref, false));
context.getDebuggeeVM().allClasses().forEach(ref -> breakpointProcessor.activateUserBreakPoints(ref, false));
}

void sendStepRequest(int threadId, int stepType) {
Expand Down

0 comments on commit 6dffd69

Please sign in to comment.