void (@NotNull ProcessEvent event) { final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject); ToolWindow window = toolWindowManager.getToolWindow(ToolWindowId.DEBUG); if (window != null) { ContentManager contentManager = window.getContentManager(); Content content = descriptor.getAttachedContent(); if (content != null) { ApplicationManager.getApplication().invokeLater(() -> contentManager.removeContent(content, true)); } } }