mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
warn about active method breakpoints on debug session start
This commit is contained in:
@@ -133,6 +133,16 @@ public class BreakpointManager {
|
||||
|
||||
@Override
|
||||
public void changeEvent(@NotNull DebuggerContextImpl newContext, int event) {
|
||||
if (event == DebuggerSession.EVENT_ATTACHED) {
|
||||
// notify about possibly slow method breakpoints
|
||||
for (XLineBreakpoint breakpoint : getXBreakpointManager().getBreakpoints(JavaMethodBreakpointType.class)) {
|
||||
if (breakpoint.isEnabled()) {
|
||||
XDebugSessionImpl.NOTIFICATION_GROUP.createNotification("Method breakpoints may dramatically slow down debugging", MessageType.WARNING).notify(
|
||||
myProject);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newContext.getDebuggerSession() != myPreviousSession || event == DebuggerSession.EVENT_DETACHED) {
|
||||
updateBreakpointsUI();
|
||||
myPreviousSession = newContext.getDebuggerSession();
|
||||
|
||||
Reference in New Issue
Block a user