Attach a Java Debugger to a Local Instance

Stop the disposable instance with bin/stop-ds, then start it with a JDWP listener on the loopback interface:

export OPENDJ_JAVA_ARGS="${OPENDJ_JAVA_ARGS:-} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:9000"
bin/start-ds --nodetach

Attach the IDE’s remote Java debugger to localhost:9000. With suspend=y, startup waits for the debugger before the server opens its LDAP listener. Set suspend=n if startup should proceed without a debugger. Run clients from a second terminal without the JDWP setting, otherwise they try to bind the same debug port.

After debugging, stop the foreground server and remove the JDWP option from OPENDJ_JAVA_ARGS before starting it normally. Keep this unauthenticated debug listener local; it grants control of the JVM to anyone who can connect.