void (@NotNull String className, @NotNull XDebugSession session, @NotNull DebugProcessImpl process, @NotNull TrackingType type) { final ClassPrepareRequestor request = new ClassPrepareRequestor() { @Override public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) { process.getRequestsManager().deleteRequest(this); trackClass(session, process, referenceType, type, myIsTrackersActivated.get()); } }; final ClassPrepareRequest classPrepareRequest = process.getRequestsManager() .createClassPrepareRequest(request, className); if (classPrepareRequest != null) { classPrepareRequest.enable(); } else { LOG.warn("Cannot create a 'class prepare' request. Class " + className + " not tracked."); } }