public boolean detach() { boolean res = onDebuggerDetachedImpl(null); if (!res) { return false; } connection.close(); return true; }
public void attach(DebugEventListener listener) throws IOException, UnsupportedVersionException, MethodIsBlockingException { Exception errorCause = null; try { attachImpl(listener); } catch (IOException e) { errorCause = e; throw e; } catch (UnsupportedVersionException e) { errorCause = e; throw e; } finally { if (errorCause != null) { disconnectReason = errorCause; connectionState = ConnectionState.DETACHED; connection.close(); } } }