public void addBreakpoint( @NotNull final String isolateId, @Nullable final XSourcePosition position, @NotNull final VmServiceConsumers.BreakpointConsumerWrapper consumer) { if (position == null || position.getFile().getFileType() != DartFileType.INSTANCE) { consumer.sourcePositionNotApplicable(); return; } addRequest( () -> { final int line = position.getLine() + 1; for (String uri : myDebugProcess.getUrisForFile(position.getFile())) { myVmService.addBreakpointWithScriptUri(isolateId, uri, line, consumer); } }); }
public void addBreakpoint( @NotNull final String isolateId, @NotNull final XLineBreakpoint<XBreakpointProperties> xBreakpoint, @NotNull final VmServiceConsumers.BreakpointConsumerWrapper consumer) { final XSourcePosition position = xBreakpoint.getSourcePosition(); if (position == null || position.getFile().getFileType() != DartFileType.INSTANCE) { consumer.sourcePositionNotApplicable(); return; } addRequest( new Runnable() { @Override public void run() { final String uri = myDebugProcess.getUriForFile(position.getFile()); final int line = position.getLine() + 1; myVmService.addBreakpointWithScriptUri(isolateId, uri, line, consumer); } }); }