debugger for emacs to step through java source code

GNU Emacs 25.1.1
Fedora release 24 (Twenty Four)
Gradle 2.14.1

I have been doing a lot of java applications lately and want to know what is the best debugger for stepping through java applications.

I would like to debug my apps from inside emacs environment by setting breakpoints and inspecting variables, etc.

I am using gradle as my build tool for compiling the application.

I have no idea how to set this up, if someone could explain how to do this.

Many thanks for any suggestions.

1

2 Answers

You could use jdb (it comes with GUD and you should have nothing to install).

Just enter M-x jdb ENT

and enter the command you would like to launch jdb with (For example jdb HelloWorld) and run/debug like in a regular jdb session.

1

I'm using JDEE (Java Development Environment for Emacs) to develop Java in Emacs, you might want to try with it. It is an add on sotware package for Emacs that assists in the development of software in the Java Programming Language, and provides many Emacs commands that help with programming of Java, including debugging.

The JDE provides two options for debugging Java applications.

  • An Emacs interface to jdb, the command-line debugger that comes with the JDK. See Debugging with jdb for more information.

  • JDEbug, a Java debugger developed specifically for use with the JDE. See JDEbug User's Guide for more information.

JDEbug provides more debugging features.

Screenshots of JDEbug

enter image description here

enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like