Skip to content

Instantly share code, notes, and snippets.

@tylerlrhodes
Created December 27, 2019 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerlrhodes/7b62f53e25544248c0d7ca36e7bd5754 to your computer and use it in GitHub Desktop.
Save tylerlrhodes/7b62f53e25544248c0d7ca36e7bd5754 to your computer and use it in GitHub Desktop.
1) Start the debugee program (HelloWorld in this example)
in one command window:
% java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=4571 HelloWorld
2) In another window, attach your debugger (jdb in this example)
to the debugee via a socket:
% jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=4571
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment