Backend Development 2 min read

How to Start a Java Server in Blocking Debug Mode and Connect Remotely via IDE

This guide explains how to launch a Java server in blocking debug mode using specific JVM options and then attach a remote debugger from an IDE, illustrated with command examples and screenshots of the connection setup.

Cognitive Technology Team
Cognitive Technology Team
Cognitive Technology Team
How to Start a Java Server in Blocking Debug Mode and Connect Remotely via IDE

To start a Java backend service in blocking debug mode, run the JVM with debugging options that open a JDWP socket and suspend the application until a debugger attaches.

Use the following command (replace xxx-api.jar with your actual JAR file):

java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=y -jar xxx-api.jar

After the JVM starts and waits, open your IDE (e.g., IntelliJ IDEA) and create a remote debugging configuration that connects to localhost:9999 . The IDE will then attach to the running process.

The article includes screenshots showing the IDE remote connection dialog and the successful attachment.

backenddebuggingJavaIDERemote Debuggingjdwp
Cognitive Technology Team
Written by

Cognitive Technology Team

Cognitive Technology Team regularly delivers the latest IT news, original content, programming tutorials and experience sharing, with daily perks awaiting you.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.