Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Debugging with emacs?

Reply
Thread Tools

Debugging with emacs?

 
 
Charles Fox
Guest
Posts: n/a
 
      05-18-2004
Hi guys,

I've noticed a lot of posts around here about how emacs is the
greatest development environment for Java, better than the 'fancy'
IDEs. While I can see how emacs could be very fast for writing and
formatting code, I don't see how it can measure up to IDEs for
debugging, I'm wondering if I'm missing something here?

Say I want to debug a multithread program and suspend and resume
threads at will, whilst inspecting all the variables and using a watch
window; or if I want the debugger to stop when an exception is thrown
(like in Eclipse). Is there a way to get emacs to do such things? My
experience with it so far has just been usign it as a front end for
jdb, which Sun describes as a 'proof of concept' debugger, not a
professional-standard solution.

Is there some amazing emacs extension which will give the same debug
capabilities as Eclipse or JBuilder?

(Or are real emacs programmers just so macho that they never write
bugs...?)
 
Reply With Quote
 
 
 
 
manuel aldana
Guest
Posts: n/a
 
      05-18-2004
Charles Fox wrote:
> Hi guys,
>
> I've noticed a lot of posts around here about how emacs is the
> greatest development environment for Java, better than the 'fancy'
> IDEs.


so far the nicest joke of the day. emacs is great with getting started
with java (to know what runs behind the scenes) but the hell i would
build bigger software this way.

to answer your debug question: i am very satisfied using log4j ->
http://logging.apache.org/log4j/docs/



--
manuel aldana

e-mail adress not valid
--> use aldana[at]cs.tu-berlin.de
 
Reply With Quote
 
 
 
 
Phillip Lord
Guest
Posts: n/a
 
      05-18-2004
>>>>> "Charles" == Charles Fox <(E-Mail Removed)> writes:

Charles> Hi guys,

Charles> I've noticed a lot of posts around here about how emacs is
Charles> the greatest development environment for Java, better than
Charles> the 'fancy' IDEs. While I can see how emacs could be very
Charles> fast for writing and formatting code, I don't see how it
Charles> can measure up to IDEs for debugging, I'm wondering if I'm
Charles> missing something here?

Charles> Say I want to debug a multithread program and suspend and
Charles> resume threads at will, whilst inspecting all the variables
Charles> and using a watch window; or if I want the debugger to stop
Charles> when an exception is thrown (like in Eclipse). Is there a
Charles> way to get emacs to do such things? My experience with it
Charles> so far has just been usign it as a front end for jdb, which
Charles> Sun describes as a 'proof of concept' debugger, not a
Charles> professional-standard solution.

Charles> Is there some amazing emacs extension which will give the
Charles> same debug capabilities as Eclipse or JBuilder?


The JDEE (http://jdee.sunsite.dk) provides support for more advanced
debugging, over and above the front end for jdb. I have a limited
experience of using, though, so I can't vouch for it. I doubt it will
give you the same debug capabilities as Eclipse. If you want this, why
not use Eclipse?

Charles> (Or are real emacs programmers just so macho that they
Charles> never write bugs...?)

Everybody writes bugs. Personally, though, I tend to rely more on unit
testing, and, when all else fails, debug statements, than a
debugger. Especially with test cases the knowledge of the debugging
remains in a code base, which you can find again if you get a similar
bug. With a debugger, all that knowledge is lost once you switch the
debugger off.

Of course you experiences may differ, but not everyone who eschews a
debugger is doing so because they are macho assholes.

Cheers

Phil

 
Reply With Quote
 
Charles Fox
Guest
Posts: n/a
 
      05-25-2004
Thanks for the tips -- I will have a good look at JDEE. I'm still not
sure about the status of GNU/emacs world, it seems to depend very much
on who you ask and what you read. The GNU books are so rampant that
you get the impression that anyone who has to use a non-GNU IDE is an
insignificant script-kiddie who should be using VB. But do I really
have to memorise bookloads of Meta-X keyboard shortcuts to write Java
'properly'? I love the idea of the GNU stuff, its just that the
reality seem so over-complicated when I actually need to write
something to a deadline! I was looking at Eclipse too, that seems to
have some of the best multithread debugging capabilities of the free
IDEs.

Any further comments would be welcome, should I put in the effort to
learn the emacs stuff or do we think that's just GNU snobbery?

Charles
 
Reply With Quote
 
Darryl L. Pierce
Guest
Posts: n/a
 
      05-25-2004
Charles Fox wrote:

> Thanks for the tips -- I will have a good look at JDEE. I'm still not
> sure about the status of GNU/emacs world, it seems to depend very much
> on who you ask and what you read. The GNU books are so rampant that
> you get the impression that anyone who has to use a non-GNU IDE is an
> insignificant script-kiddie who should be using VB. But do I really
> have to memorise bookloads of Meta-X keyboard shortcuts to write Java
> 'properly'?


Absolutely not. You can get by with only those you use *regularly* and can
forget the others since you'll never use them. My day is spent with:

CTRL+x+f -> Load file
CTRL+x+b -> Switch buffers
CTRL+x+1 -> Go back to a single buffer when I screw up my display <g>
CTRL+c+v . -> Get a list of available completions
CTRL+c+v+. -> Get the first available completion
CTRL+x s -> Save everything
ESC % -> Search and replace
CTRL+c+v+b -> Build

That's it.

--
/**
* @author Darryl L. Pierce <(E-Mail Removed)>
* @see The J2ME FAQ <http://mypage.org/mcpierce/j2mefaq.html>
* @quote "What do you care what others think, Mr. Feynman?"
* @geek echo '$_ = "Jvtu bopuifs Pfsm ibdlfs."; y/a-z/za-y/; print' |
perl
*/
 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      05-25-2004
Charles Fox wrote:
<snip>
> Any further comments would be welcome, should I put in the effort to
> learn the emacs stuff or do we think that's just GNU snobbery?


One of the best programmers I ever met had such a finely-tuned
emacs environment that he could pump out code like nobody's
business. He also had it customized to the hilt, to the point
that noone else (even someone who knew emacs) could use his
environment.
Who am I to argue with success?
OTOH, larger projects typically standardize on the toolset
used. It helps if everyone can use everyone else's computer
(essential for XP).
I wouldn't go back and learn emacs today. I can use vi for Q&D
(quick and dirty) development or step up to Eclipse if I need
to debug servlets and/or EJBs in my J2EE servers.
YMMV

 
Reply With Quote
 
Phillip Lord
Guest
Posts: n/a
 
      05-25-2004


>>>>> "Charles" == Charles Fox <(E-Mail Removed)> writes:


Charles> Thanks for the tips -- I will have a good look at JDEE.
Charles> I'm still not sure about the status of GNU/emacs world, it
Charles> seems to depend very much on who you ask and what you read.

Well, of course it does. Choice of an editor, IDE, or other
environment is a entirely personal decision. This is as true of emacs
as anything else.


Charles> The GNU books are so rampant that you get the impression
Charles> that anyone who has to use a non-GNU IDE is an
Charles> insignificant script-kiddie who should be using VB.

Which "Gnu books" would these be.



Charles> But do
Charles> I really have to memorise bookloads of Meta-X keyboard
Charles> shortcuts to write Java 'properly'?

No. Emacs has now, and has for many years had, a menu system. The
keyboard shortcuts are a feature, which you do not have to use. It's
just that most Emacs users do use them. Once you get going with them,
having a keyboard driven interface is very fast, very easy on the
wrists.

Most people start using new Emacs functionality with the menu system,
and then migrate to the keyboard when they get used to it for this
reason.


Charles> Any further comments would be welcome, should I put in the
Charles> effort to learn the emacs stuff or do we think that's just
Charles> GNU snobbery?


If you learn to use emacs well it will pay you back. Whether it pays
you back enough to be worth the effort is not something anyone here
can answer.

Phil
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I skip debugging Ajax when debugging my code? AAaron123 ASP .Net 3 07-28-2009 04:07 PM
Debugging C vs debugging C++ jacob navia C Programming 11 10-27-2006 07:19 PM
No Debugging of C# Server-Side Script, but Code-Behind Debugging Works Johann Blake ASP .Net 1 01-05-2004 03:01 PM
Got error msg while Debugging : Error while trying to run project: ... ^CrazyCoder^ ASP .Net 3 09-15-2003 09:40 AM
Garbage Collector Debugging Rob Tillie ASP .Net 11 08-18-2003 10:39 PM



Advertisments