I successfully attach to my java app with emacs & gud, but gud-break doesn't work as expected: it runs only:

stop at :48

if the line number is 48. So even the class name is missing and the command fails. If I manually type in the gud prompt stop at <class>:48 that also doesn't work, I must type in the full package name: stop at com.app.Class:48.

How can I make gud run the correct command? I found about gud-def but I am baffled that this is not done properly out of the box and secondly, gud-def allows to insert the file name (class name) but I have no idea how I would insert the package name?


OK I got it... I started jdb with:

jdb -attach <port>

but starting it with:

jdb -attach <port> -sourcepath<source path on disk>

gud-break now works as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.