Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eclim-debug/jdb: Symbol's function definition is void: toggle-maximize-buffer #253

Open
ghost opened this issue Oct 14, 2015 · 7 comments
Open

Comments

@ghost
Copy link

ghost commented Oct 14, 2015

I want to debug java code, I run eclim-debug-attach, get error: eclim-debug/jdb: Symbol's function definition is void: toggle-maximize-buffer

My os is mac 10.11
emacs version: 24.5.1

@ProjectMoon
Copy link

Having this as well. It appears toggle-maximize-buffer is not a standard emacs function. The only thing I found for it is https://gist.github.com/mads379/3402786.

@skybert
Copy link

skybert commented Oct 14, 2015

ProjectMoon writes:

Having this as well. It appears toggle-maximize-buffer is not a
standard emacs function. The only thing I found for it is
https://gist.github.com/mads379/3402786.

You're right. The call to toggle-maximize-buffer was introduces in
79d6e3a to open jdb in a different
window but keep focus in the current one.

Adding this gist to your .emacs solves the problem.

Cheers,

-Torstein

@ghost
Copy link
Author

ghost commented Oct 14, 2015

Thank you @ProjectMoon and @skybert, I have another question: how to add breakpoint, and how to add debug configure with maven?

@skybert
Copy link

skybert commented Oct 14, 2015

zwb-ict writes:

I have another question: how to add breakpoint, and how to add debug
configure with maven?

After you've started jdb with eclim-debug-attach, everything is set up
for you with regards to source and classpath. The interface to jdb is
gud, so you set breakpoints with gud-break and navigate the debugger
with C-c C-n (next) and so on.

See the GUD manual for more:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Commands-of-GUD.html

Also, I'd recommend you to enter "monitor locals" into jdb once it's
running so that it's constantly updating the local variables for you.

I'm using a very simple command that I call once my gud/jdb session is
open, which does that as well as giving me some colour coding on the
variables and any references to the project's classes:

(defun tkj-java-debug-highlighting()
  (interactive)
  (insert "monitor locals\n")
  (highlight-regexp "^[a-zA-Z].* =" "hi-green")
  (highlight-phrase "com.escenic" "hi-red-b"))

That's it. You don't need anything more for debugging local JUnit tests
or remote Java processes (given that they're started with standard JVM
parameters for remote debugging and that you enter the right port after
you run attach).

Cheers,

-Torstein

@ghost
Copy link
Author

ghost commented Oct 15, 2015

Thank you, @skybert, I did as you told, it works greate now!

@ghost ghost closed this as completed Oct 16, 2015
@ProjectMoon
Copy link

This shouldn't be closed, I would think. This is a problem with emacs-eclim because Emacs itself does not have the function referenced in this issue. I say this should be reopened as a request to include the function referenced in the gist a part of emacs-eclim so the debugger works out of the box.

@ulises
Copy link

ulises commented Dec 21, 2015

+1 to not closing. Having to add a gist to your .emacs is by no means a fix to this issue.

@ghost ghost reopened this Dec 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants