Debugging with emacs?

Discussion in 'Java' started by Charles Fox, May 18, 2004.

  1. Charles Fox

    Charles Fox Guest

    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...?)
     
    Charles Fox, May 18, 2004
    #1
    1. Advertising

  2. 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
     
    manuel aldana, May 18, 2004
    #2
    1. Advertising

  3. Charles Fox

    Phillip Lord Guest

    >>>>> "Charles" == Charles Fox <> 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
     
    Phillip Lord, May 18, 2004
    #3
  4. Charles Fox

    Charles Fox Guest

    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
     
    Charles Fox, May 25, 2004
    #4
  5. 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 <>
    * @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
    */
     
    Darryl L. Pierce, May 25, 2004
    #5
  6. Charles Fox

    Sudsy Guest

    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
     
    Sudsy, May 25, 2004
    #6
  7. Charles Fox

    Phillip Lord Guest


    >>>>> "Charles" == Charles Fox <> 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
     
    Phillip Lord, May 25, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wezzy

    Debugging Python with Emacs

    Wezzy, Jun 14, 2004, in forum: Python
    Replies:
    1
    Views:
    4,915
    Peter Milliken
    Jun 14, 2004
  2. Andrew Markebo

    Debugging from within emacs!

    Andrew Markebo, May 18, 2005, in forum: Python
    Replies:
    0
    Views:
    325
    Andrew Markebo
    May 18, 2005
  3. Gary Wessle

    debugging in emacs

    Gary Wessle, Apr 23, 2006, in forum: Python
    Replies:
    2
    Views:
    337
    Steve Juranich
    Apr 24, 2006
  4. Victor Ng
    Replies:
    3
    Views:
    250
    Gabriel Genellina
    Nov 25, 2006
  5. Adam Funk
    Replies:
    4
    Views:
    235
    Adam Funk
    Jan 29, 2007
Loading...

Share This Page