java myapp -Xdebug -Xrunjdwp:server=y, transport=dt_socket,address=4000, suspend=nNo spaces in the runjdwp option.
Options come before the class name. Any arguments you have after the class name are arguments to your program!
suspend = y
Wait for debugger attach.
Updated:
2026 Aug 19

