docs: @SuppressWarnings({ "rawtypes", "unchecked" })
      private void createDebug() {
  
          frame = new JFrame("Smack Debug Window");
  
          if (!PERSISTED_DEBUGGER) {
              // Add listener for window closing event
              frame.addWindowListener(new WindowAdapter() {
                  @Override
                  public void windowClosing(WindowEvent evt) {
                      rootWindowClosing(evt);
                  }
              });
          }
  
          // We'll arrange the UI into tabs. The last tab contains Smack's information.
          // All the connection debugger tabs will be shown before the Smack info tab.
          tabbedPane = new JTabbedPane();
  
          // Create the Smack info panel
          JPanel informationPanel = new JPanel();
          informationPanel.setLayout(new BoxLayout(informationPanel, BoxLayout.Y_AXIS));
  
          // Add the Smack version label
          JPanel versionPanel = new JPanel();
          versionPanel.setLayout(new BoxLayout(versionPanel, BoxLayout.X_AXIS));
          versionPanel.setMaximumSize(new Dimension(2000, 31));
          versionPanel.add(new JLabel(" Smack version: "));
          JFormattedTextField field = new JFormattedTextField(SmackConfiguration.getVersion());
          field.setEditable(false);
          field.setBorder(null);
          versionPanel.add(field);
          informationPanel.add(versionPanel);
  
          // Add the list of installed IQ Providers
          JPanel iqProvidersPanel = new JPanel();
          iqProvidersPanel.setLayout(new GridLayout(1, 1));
          iqProvidersPanel.setBorder(BorderFactory.createTitledBorder("Installed IQ Providers"));
          Vector<String> providers = new Vector<>();
          for (Object provider : ProviderManager.getIQProviders()) {
              if (provider.getClass() == Class.class) {
                  providers.add(((Class<?>) provider).getName());
              }
              else {
                  providers.add(provider.getClass().getName());
              }
          }
          // Sort the collection of providers
          Collections.sort(providers);
          JList list = new JList(providers);
          iqProvidersPanel.add(new JScrollPane(list));
          informationPanel.add(iqProvidersPanel);
  
          // Add the list of installed Extension Providers
          JPanel extensionProvidersPanel = new JPanel();
          extensionProvidersPanel.setLayout(new GridLayout(1, 1));
          extensionProvidersPanel.setBorder(BorderFactory.createTitledBorder("Installed Extension Providers"));
          providers = new Vector<>();
          for (Object provider : ProviderManager.getExtensionProviders()) {
              if (provider.getClass() == Class.class) {
                  providers.add(((Class<?>) provider).getName());
              }
              else {
                  providers.add(provider.getClass().getName());
              }
          }
          // Sort the collection of providers
          Collections.sort(providers);
          list = new JList(providers);
          extensionProvidersPanel.add(new JScrollPane(list));
          informationPanel.add(extensionProvidersPanel);
  
          tabbedPane.add("Smack Info", informationPanel);
  
          // Add pop-up menu.
          JPopupMenu menu = new JPopupMenu();
          // Add a menu item that allows to close the current selected tab
          JMenuItem menuItem = new JMenuItem("Close");
          menuItem.addActionListener(new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  // Remove the selected tab pane if it's not the Smack info pane
                  if (tabbedPane.getSelectedIndex() < tabbedPane.getComponentCount() - 1) {
                      int index = tabbedPane.getSelectedIndex();
                      // Notify to the debugger to stop debugging
                      EnhancedDebugger debugger = debuggers.get(index);
                      debugger.cancel();
                      // Remove the debugger from the root window
                      tabbedPane.remove(debugger.tabbedPane);
                      debuggers.remove(debugger);
                      // Update the root window title
                      frame.setTitle(
                              "Smack Debug Window -- Total connections: "
                                      + (tabbedPane.getComponentCount() - 1));
                  }
              }
          });
          menu.add(menuItem);
          // Add a menu item that allows to close all the tabs that have their connections closed
          menuItem = new JMenuItem("Close All Not Active");
          menuItem.addActionListener(new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  ArrayList<EnhancedDebugger> debuggersToRemove = new ArrayList<>();
                  // Remove all the debuggers of which their connections are no longer valid
                  for (int index = 0; index < tabbedPane.getComponentCount() - 1; index++) {
                      EnhancedDebugger debugger = debuggers.get(index);
                      if (!debugger.isConnectionActive()) {
                          // Notify to the debugger to stop debugging
                          debugger.cancel();
                          debuggersToRemove.add(debugger);
                      }
                  }
                  for (EnhancedDebugger debugger : debuggersToRemove) {
                      // Remove the debugger from the root window
                      tabbedPane.remove(debugger.tabbedPane);
                      debuggers.remove(debugger);
                  }
                  // Update the root window title
                  frame.setTitle(
                          "Smack Debug Window -- Total connections: "
                                  + (tabbedPane.getComponentCount() - 1));
              }
          });
          menu.add(menuItem);
          // Add listener to the text area so the popup menu can come up.
          tabbedPane.addMouseListener(new PopupListener(menu));
  
          frame.getContentPane().add(tabbedPane);
  
          frame.setSize(650, 400);
  
          if (!PERSISTED_DEBUGGER) {
              frame.setVisible(true);
          }
      }