NES said:
Yes, I see the console. But there is nothing there. However, I was
unaware of Eclipse having multiple consoles. As for the debugger, I
think it would take too much time for me to learn it, and print
statement work for me. Well, not in this case I guess.
If you put a print statement in your code, say:
System.out.println("BlabBlabBlab: "+var_BlabBlabBlab);
I am assuming that you have already selected from the menu "Window\Show
View\Console". And you do not see the print output, in the Eclipse
console, then that maybe your problem. That is, it is not falling thru
that code.
GUI *Debuggers* are easy, you just have to do it once to start using it.
Do this:
- Where you put your println() statement just double click on the left
blue border of the editor window at that line. A blue button will
display. This is where you want the program to stop.
- Instead of selecting "Run as Java Applet". Just select "Debug as Java
Applet".
- If\when your program passes that statement, it stops and then the
debugger perspective will display. Up in the top left corner is the
"Debug panel" you will see 5 yellow arrows. Just use the first two. They
all popup a 'tooltip' if you hover your cursor over them.
The first arrow you use to "Step Into". You use this say if you are on a
line of code that calls a method. This will take you into that called
method.
The second arrow is to "Step Over". This means to just goto the next
executable line of code.
To watch an object's value just select the object and then right click.
Then select "Watch". This will put the object, and a display of its
value, up in the right top panel called "Expressions"...
Just fool around with this it will take you a lot further that println()
statements.
While you are trying to debug and debug perspective is open, just select
"Menu Help\Dynamic Help". Then select "Debugging your programs". And
cruse some instruction as you debug.
As a Java programmer, no, as a programmer, you really need to know how
to use a GUI debugger. They are 99.9% of the time the same across all
developer GUI's.
Old saying, "Pay me now or pay me later".
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)