Results 1 to 13 of 13

Thread: Tracing

  1. #1
    feniger is offline Member
    Join Date
    Dec 2007
    Posts
    17
    Rep Power
    0

    Default Tracing

    I have a logical bug, I mean my code compiles and runs without errors,
    only it doesnt do what I wanted it to.
    I remember when I programmed in prolog I could trace the code - one command at a time, and figure out where my bug is,
    can I do the same in java? using eclipse.
    have a good one - Day I mean...

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default

    Sure you can do it in Eclipse. You can run you application a debug mode. You debug a simple java application or even a web application if you want.

  3. #3
    feniger is offline Member
    Join Date
    Dec 2007
    Posts
    17
    Rep Power
    0

    Default trace

    excuse my ignorancy, how do I do that?
    have a good one - Day I mean...

  4. #4
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default

    If you work java appplication, from the Run menu you can select the Debug menu. Or right click in the text editor and select Debug As... Java Application.

  5. #5
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default Tracing

    Hello feniger

    Try looking in the program's menus for a "step in" or "step over" command and remember its shortcut key. If you use "step in" the debugger will run into each method it encounters, while "step over" will run the method and continue to the next line of code. Most IDEs have this functionality. You must be in debug mode though.

    It is also useful to use break points in your program. The program will execute normally while you are in debug mode and when it encounters a break point, it will stop and then you can take a look at your variables by using adding watch.

    I have never used eclipse, but I think it should, at least, have these debugging features available. ;) If it does not, consider using Netbeans.
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

  6. #6
    feniger is offline Member
    Join Date
    Dec 2007
    Posts
    17
    Rep Power
    0

    Default

    I should probably use netbeans... its got more tutorials anyway...
    have a good one - Day I mean...

  7. #7
    dubdubdub is offline Member
    Join Date
    Nov 2007
    Posts
    17
    Rep Power
    0

    Default

    is eclipse or some other program free?
    Sorry to sound so cheap,
    Maybe I should go and buy Borland if I want too take java seriously.

  8. #8
    feniger is offline Member
    Join Date
    Dec 2007
    Posts
    17
    Rep Power
    0

    Default

    both java and eclipse are great AND free...
    you should probably search around for information about Java to take it more seriously...
    have a good one - Day I mean...

  9. #9
    dubdubdub is offline Member
    Join Date
    Nov 2007
    Posts
    17
    Rep Power
    0

    Default

    Thank you for your speedy reply feniger
    Is this any better than Netbeans I see they are about the same size to download (well sort of) and I am downloading Netbeans6 at the moment just 6 more hours to go (50% so far).

    From Eric

  10. #10
    feniger is offline Member
    Join Date
    Dec 2007
    Posts
    17
    Rep Power
    0

    Default

    I'd recommand you finish downloading netbeans, and learn through that cause its a more popular IDE.
    I use eclipse because I got used to it before I knew about netbeans,
    now I dont have time and will to switch.
    have a good one - Day I mean...

  11. #11
    dubdubdub is offline Member
    Join Date
    Nov 2007
    Posts
    17
    Rep Power
    0

    Default

    OK I have just taken my "Moderator friendly" pill and now I am very happy & over the moon.


    I just spent all morning downloading Netbeans6 all (98 Meg of it) and I go to install and it says I need JDK 1.5.0_06 I must of had a older version (and that means another big down load) almost as big as the other file what a ............... [opps I feel the pill wearing off I must go]



    ---- more ----
    I just found out there is a smaller download called jGRASP program
    jGRASP Home Page
    Last edited by dubdubdub; 12-30-2007 at 03:04 AM. Reason: more information

  12. #12
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Quote Originally Posted by dubdubdub View Post
    is eclipse or some other program free?
    Sorry to sound so cheap,
    Maybe I should go and buy Borland if I want too take java seriously.
    FREE! :) Oh, and if you want to do serious coding in java, use Netbeans. ;)

    EDIT: Oh, good, I see you got Netbeans... you can find the Netbeans 6.0/JDK bundle on Suns site for more convenience.

  13. #13
    feniger is offline Member
    Join Date
    Dec 2007
    Posts
    17
    Rep Power
    0

    Default

    Quote Originally Posted by CaptainMorgan View Post
    FREE! :) Oh, and if you want to do serious coding in java, use Netbeans. ;)

    CaptainMorgan,
    is there a concrete reason why NetBeans is more professional than eclipse?
    at first glimpse they look very similar,
    whats your opinion about it and what is unique in NetBeans?
    have a good one - Day I mean...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •