/** * Test whether breakpoints are active in this session. Breakpoints do not break execution when * not active. * * @since 0.24 * @deprecated Use {@link #isBreakpointsActive(Breakpoint.Kind)} instead. */ @Deprecated public boolean isBreakpointsActive() { for (Breakpoint.Kind kind : Breakpoint.Kind.VALUES) { if (isBreakpointsActive(kind)) { return true; } } return false; }
@TruffleBoundary @SuppressWarnings("hiding") // We want to mask "sessions", as we recieve preferred ones private void doBreak(DebuggerNode source, DebuggerSession[] sessions, MaterializedFrame frame, boolean onEnter, Object result, BreakpointConditionFailure failure) { if (!isEnabled()) { // make sure we do not cause break events if we got disabled already // the instrumentation framework will make sure that this is not happening if the // binding was disposed. return; } SuspendAnchor anchor = onEnter ? SuspendAnchor.BEFORE : SuspendAnchor.AFTER; for (DebuggerSession session : sessions) { if (session.isBreakpointsActive()) { session.notifyCallback(source, frame, anchor, null, result, failure); } } }
@TruffleBoundary private Object doBreak(DebuggerNode source, DebuggerSession[] breakInSessions, MaterializedFrame frame, boolean onEnter, Object result, Throwable exception, Node throwLocation, boolean isCatchNodeComputed, DebugException.CatchLocation catchLocation, BreakpointConditionFailure failure) { if (!isEnabled()) { // make sure we do not cause break events if we got disabled already // the instrumentation framework will make sure that this is not happening if the // binding was disposed. return result; } if (this.hitCount.incrementAndGet() <= ignoreCount) { // breakpoint hit was ignored return result; } SuspendAnchor anchor = onEnter ? SuspendAnchor.BEFORE : SuspendAnchor.AFTER; Object newResult = result; for (DebuggerSession session : breakInSessions) { if (session.isBreakpointsActive(getKind())) { DebugException de; if (exception != null) { de = new DebugException(session, exception, null, throwLocation, isCatchNodeComputed, catchLocation); } else { de = null; } newResult = session.notifyCallback(source, frame, anchor, null, newResult, de, failure); } } return newResult; }
for (DebuggerNode node : nodes) { Breakpoint breakpoint = node.getBreakpoint(); if (breakpoint == null || !isBreakpointsActive(breakpoint.getKind())) { continue; // not a breakpoint node
} else if (session.isBreakpointsActive(getBreakpoint().getKind())) { active = true;
for (DebuggerNode node : nodes) { Breakpoint breakpoint = node.getBreakpoint(); if (breakpoint == null || !isBreakpointsActive()) { continue; // not a breakpoint node
} else if (session.isBreakpointsActive(breakpoint.getKind())) { active = true;
if (session.isBreakpointsActive()) { active = true; break;
for (DebuggerNode node : nodes) { Breakpoint breakpoint = node.getBreakpoint(); if (breakpoint == null || isBreakpointsActive(breakpoint.getKind()) && breakpoint.getCondition() == null) {