IntelliJ IDEA's Built-in Remote Debugging | Generated by AI

Home PDF

To connect IntelliJ IDEA to the debug port of a WebSphere Liberty Server that you’ve started with server debug default, without using the WebSphere Liberty plugin, you can leverage IntelliJ IDEA’s built-in remote debugging feature. This approach works because WebSphere Liberty, when started in debug mode, exposes a debug port (typically 7777 by default) that any JVM debugger, including IntelliJ IDEA, can attach to. Below are the detailed steps to achieve this:


Step 1: Start the WebSphere Liberty Server in Debug Mode

When you run server debug default (assuming “default” is the name of your server; replace it with your actual server name if different), WebSphere Liberty starts with debugging enabled. By default, this command configures the server to listen for debug connections on port 7777.


Step 2: Confirm the Debug Port

The default debug port for WebSphere Liberty is 7777. However, if this port is in use or has been customized:

For this guide, we’ll assume the default port 7777 unless your setup indicates otherwise.


Step 3: Configure Remote Debugging in IntelliJ IDEA

IntelliJ IDEA’s remote debugging feature allows you to connect to the server’s JVM without needing a specific WebSphere plugin. Here’s how to set it up:

  1. Open Run/Debug Configurations:
    • In IntelliJ IDEA, go to the top menu and select Run > Edit Configurations.
  2. Add a New Remote Debug Configuration:
    • Click the + button (or “Add New Configuration”) in the top-left corner.
    • From the list, select Remote JVM Debug (it might just say “Remote” depending on your IntelliJ version).
  3. Set Configuration Details:
    • Name: Give it a meaningful name, e.g., “WebSphere Liberty Debug.”
    • Host: Set to localhost (assuming the server runs on the same machine as IntelliJ IDEA; use the server’s IP address if it’s remote).
    • Port: Set to 7777 (or the actual debug port if different).
    • Transport: Ensure it’s set to Socket.
    • Debugger Mode: Select Attach (this tells IntelliJ to connect to an already-running JVM).
    • Leave other settings (like “Command line arguments for remote JVM”) as default unless you need specific JVM options.
  4. Save the Configuration:
    • Click Apply and then OK to save.

Step 4: Start Debugging

With the server running in debug mode and the configuration set up:


Step 5: Debug Your Application


Additional Notes


Summary

By starting your WebSphere Liberty Server with server debug default (which enables debugging on port 7777 by default) and configuring a remote debug setup in IntelliJ IDEA, you can connect to the server’s debug port without the WebSphere Liberty plugin. This gives you full debugging capabilities—breakpoints, variable inspection, and step-through execution—directly within IntelliJ IDEA.


Back 2025.03.28 Donate