@Override public void consume(@NotNull DebuggerState o) { if (o.exited) { stop(); return; } XBreakpoint<DlvBreakpointProperties> find = findBreak(o.breakPoint); send(new DlvRequest.StacktraceGoroutine()).done(locations -> { DlvSuspendContext context = new DlvSuspendContext(DlvDebugProcess.this, o.currentThread.id, locations, getProcessor()); XDebugSession session = getSession(); if (find == null) { session.positionReached(context); } else { session.breakpointReached(find, null, context); } }); }
session.positionReached(context); } else { session.breakpointReached(breakpoint, null, context);
@Override public void run() { getDebugSession().positionReached(getSuspendContext()); } }
@Override public void run() { if (!getXDebugSession().isStopped()) { // Since there is no equivalent metaphor in traditional debug sessions, this simulates // the desired behavior of clearing the current context by setting the current // position // to an empty context getXDebugSession().positionReached(new XSuspendContext() {}); } } });
private void navigateToBreakpoint(@NotNull Breakpoint target) { Date snapshotTime; try { if (target.getFinalTime() == null) { LOG.warn("Could not resolve final time from breakpoint."); snapshotTime = new Date(); } else { snapshotTime = ISODateTimeFormat.dateTime().parseDateTime(target.getFinalTime()).toDate(); } } catch (IllegalArgumentException iae) { LOG.warn("Could not parse breakpoint timestamp using ISO8601."); snapshotTime = new Date(); } DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); currentSnapshot = target; if (!getXDebugSession().isStopped()) { getXDebugSession() .positionReached( new MySuspendContext( new CloudExecutionStack( getXDebugSession().getProject(), StackdriverDebuggerBundle.getString( "clouddebug.stackat", df.format(snapshotTime)), target.getStackFrames(), target.getVariableTable(), target.getEvaluatedExpressions()))); } }
getSession().positionReached(suspendContext);