void (@NotNull IdeaPluginDescriptor pluginDescriptor) { XDebugSession[] sessions = getDebugSessions(); for (XDebugSession session : sessions) { XDebugProcess process = session.getDebugProcess(); if (process.dependsOnPlugin(pluginDescriptor)) { throw new CannotUnloadPluginException("Plugin is not unload-safe because of the started debug session"); } } }