Skip to content

Commit

Permalink
Fix breakpoint changes inside Ballerina services after starting a deb…
Browse files Browse the repository at this point in the history
…ug session
  • Loading branch information
NipunaRanasinghe committed Jan 8, 2025
1 parent d8a9cfa commit 94bd439
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 @@ -175,8 +175,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 94bd439

Please sign in to comment.