emacs-eclim icon indicating copy to clipboard operation
emacs-eclim copied to clipboard

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

Open ghost opened this issue 9 years ago • 7 comments

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

ghost avatar Oct 14 '15 06:10 ghost

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.

ProjectMoon avatar Oct 14 '15 11:10 ProjectMoon

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 79d6e3a70e99d2e47fdaaba7a030300f6a010b99 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

skybert avatar Oct 14 '15 12:10 skybert

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

ghost avatar Oct 14 '15 14:10 ghost

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

skybert avatar Oct 14 '15 19:10 skybert

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

ghost avatar Oct 15 '15 06:10 ghost

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.

ProjectMoon avatar Oct 23 '15 20:10 ProjectMoon

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

ulises avatar Dec 21 '15 08:12 ulises