void (@NotNull ProcessEvent event) { if (!ApplicationManager.getApplication().isUnitTestMode()) { // 1 second delay to allow jvm to start correctly AppExecutorUtil.getAppScheduledExecutorService() .schedule(() -> myEnabled.set(!myProcessHandler.isProcessTerminating() && !myProcessHandler.isProcessTerminated() && JavaDebuggerAttachUtil.canAttach(myProcessHandler)), 1, TimeUnit.SECONDS); } }