12
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
  • 1
    “What is the best FOO” is usually a request for an opinion; and opinion-asking questions are not a good fit for StackOverflow. Can you please re-write the question so that it asks a question with exactly one objectively correct answer. Commented Sep 12, 2016 at 5:23

2 Answers 2

7
+150

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I'm having a hell of a time trying to install this on XEmacs 2.1
6

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.