Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For Java programs, you run the JAR with a flag telling it to launch a remote-debug server listening on some port (traditionally 5005):

  java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
If your app is a gradle app, the flag is "--debug-jvm"

Then you connect to it with "jdb"



Thanks, I'll try that if I'm ever Java debugging again!

I don't think I want to do it myself, but I'd love a "101 ways to get into a debugger" webpage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: