Seems like jdb doesn't work with maven. Everything I look up online is talking about debugging maven through Eclipse or IntelliJ. I'm literally just making this project through UNIX with maven. Normally I could debug using println or something but this is my first multi-threaded project and I have no idea where to start. Just want to step through the program line by line.
Asked
Active
Viewed 227 times
1 Answers
1
It sounds like you want to use mvnDebug
to execute instead of just mvn
, this will run in remote debugging mode. Then connect to the port from another terminal window while the program is running with jdb jdb -attach 8000
(this is the default port, it should print in the console what it's actually using)

Adrian Visan
- 73
- 6
-
So when it says "Listening for transport dt_socket at address: 8000", I should enter the command "jdb -attach 8000"? It doesn't seem to do anything – NoClue Dec 27 '18 at 00:54
-
What output do you get from the 2 terminal windows? It sounds like the first one is starting the debugging session, is it terminating before the connection? – Adrian Visan Dec 27 '18 at 01:13
-
Sorry I misread your original post and was only using one terminal window. Works now, thanks! – NoClue Dec 27 '18 at 01:21
-
1My original post didn't contain the info about the separate terminal, I realised that and updated afterwards. My apologies for not giving a comprehensive answer on the first try. Glad to have been of help in the end. – Adrian Visan Dec 27 '18 at 01:30