Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to use the Eclipse Debugger?(Any help file on the usage of the Eclipse Debugger)
How to use the Eclipse Debugger? [message #1768608] Thu, 20 July 2017 14:13 Go to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
Hi!
Are there any help file available on the usage of the Eclipse Debugger?

Suppose I have the following console output. What does it say about the problem? The codes are posted hereunder:
Enter Length : 1.5
Exception in thread "main" java.util.InputMismatchException
	at java.util.Scanner.throwFor(Scanner.java:857)
	at java.util.Scanner.next(Scanner.java:1478)
	at java.util.Scanner.nextInt(Scanner.java:2108)
	at java.util.Scanner.nextInt(Scanner.java:2067)
	at areaandperimeterofarectangle.AreaAndPerimeterOfARectangle.main(AreaAndPerimeterOfARectangle.java:30)

Will it be possible to understand why the error happened, without looking at the .java code?
What does each line on the above console outputs signify?

[Updated on: Thu, 12 October 2017 15:47] by Moderator

Report message to a moderator

Re: How to use the Eclipse Debugger? [message #1768614 is a reply to message #1768608] Thu, 20 July 2017 15:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Google "how to use eclipse debugger" and you'll find all kinds of matches, including this one: http://www.vogella.com/tutorials/EclipseDebugging/article.html

In Eclipse's Console view the stack trace will act as a hyper link to navigate to the source. Likely you need to look at source code and understand it to see what's going wrong. Of course the method you call has javadoc and you can read that too.

You can Google "java stack trace" to find things like this: https://stackoverflow.com/questions/3988788/what-is-a-stack-trace-and-how-can-i-use-it-to-debug-my-application-errors

Google is your friend. Enter the question and you will find answers that already exist.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use the Eclipse Debugger? [message #1768627 is a reply to message #1768614] Thu, 20 July 2017 17:38 Go to previous messageGo to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
I know where the code went wrong and how it went wrong! I was wondering whether it was possible to look at the terminated output of the console and say what went wrong! Wondering whether the console output was legible and the error was traceable from the console output!
I am attaching the debugging outputs here. The Variables- and the Breakpoints- windows are both blank.
index.php/fa/30056/0/
Google can wait till I find out whether the effort for learning debugging is worth it!
  • Attachment: Debug.jpeg
    (Size: 30.56KB, Downloaded 350 times)

[Updated on: Thu, 20 July 2017 18:09]

Report message to a moderator

Re: How to use the Eclipse Debugger? [message #1768631 is a reply to message #1768627] Thu, 20 July 2017 18:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Yes, you should learn the debugger. Once the process is terminated, of you can't debug anymore. Read the tutorial.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use the Eclipse Debugger? [message #1768632 is a reply to message #1768631] Thu, 20 July 2017 18:16 Go to previous messageGo to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
I never would have let you repeat your advice twice! You are held in such high esteem!
I have already read the Vogel tutorial, but it is very generalised. It doesn't teach which output codes relate to which errors! There is no tablular data!
I had found other tutorials via Google search by today morning itself, and then on a brainwave tried my idea to find out whether the experienced programmers could identify the errors without looking at the program, but only the errors/outputs!

[Updated on: Thu, 20 July 2017 18:20]

Report message to a moderator

Re: How to use the Eclipse Debugger? [message #1768634 is a reply to message #1768632] Thu, 20 July 2017 19:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
No, interpreting a stack trace is like reading tea leaves. One must see the code involved to make sense of it, and even then, often one must reproduce the state of the process at that point in order to actually understand the values of all the variables involved. Things like exception breakpoints (as explained in the tutorial) can be super valuable for that.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use the Eclipse Debugger? [message #1768635 is a reply to message #1768634] Thu, 20 July 2017 19:31 Go to previous message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
Messages: 58
Registered: July 2014
Member
Presently, the console portion is gibberish to me! I will attempt a crack at it at a later time. Please permit me to postpone this learning outcome!

[Updated on: Fri, 21 July 2017 09:15]

Report message to a moderator

Previous Topic:Download .jar from Mars
Next Topic:Black tooltips on dark background
Goto Forum:
  


Current Time: Fri Mar 29 15:53:51 GMT 2024

Powered by FUDForum. Page generated in 0.04028 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top