Results 1 to 13 of 13
Thread: Tracing
- 12-29-2007, 01:35 AM #1
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0
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...
- 12-29-2007, 01:38 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
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.
Website: Learn Java by Examples
- 12-29-2007, 01:45 AM #3
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0
trace
excuse my ignorancy, how do I do that?
have a good one - Day I mean...
- 12-29-2007, 02:37 AM #4
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
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.
Website: Learn Java by Examples
- 12-29-2007, 09:32 AM #5
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.
- 12-29-2007, 01:08 PM #6
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0
I should probably use netbeans... its got more tutorials anyway...
have a good one - Day I mean...
- 12-29-2007, 04:19 PM #7
Member
- Join Date
- Nov 2007
- Posts
- 17
- Rep Power
- 0
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.
- 12-29-2007, 07:43 PM #8
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0
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...
- 12-29-2007, 09:17 PM #9
Member
- Join Date
- Nov 2007
- Posts
- 17
- Rep Power
- 0
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
- 12-29-2007, 09:42 PM #10
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0
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...
- 12-30-2007, 02:25 AM #11
Member
- Join Date
- Nov 2007
- Posts
- 17
- Rep Power
- 0
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 PageLast edited by dubdubdub; 12-30-2007 at 03:04 AM. Reason: more information
- 12-30-2007, 10:36 AM #12
- 01-04-2008, 07:42 PM #13
Member
- Join Date
- Dec 2007
- Posts
- 17
- Rep Power
- 0


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks