Solved

breakpoints in eclipse

Posted on 2014-03-06
2
191 Views
Last Modified: 2014-03-25
what is effective way of putting breakpoints in eclipse. Where and how we have to put for effective debugging.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
2 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39911393
You put them at the code that you need to debug the operation of. Not really much more that can be said on that...

Maybe I will just say that you can only put breakpoints on lines of code that actually execute, ie. you can't put a breakpoint on a line that just defines a variable, as an example. Also, it may be obvious to some but generally it helps to put the breakpoint on some part of the code that executes *before* the part that you are interested in, so that you can see the state of your app before part in question and then "step" into the code. It's much easier to step forward in code than the step back to something that has already happened.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39930489
then "step" into the code

I am not very clear on this Step Into  esp if the line has chain of 5 different methods each method with argument of someother method call. How to come back once you 'Step Into'. Click Step Reurn or Resume?

say my line number 100 is like below where i put break point

String fInput = StringUtils.substring(input, inputStartIndex + fieldDef.getBeginIndex(), inputStartIndex + fieldDef.getBeginIndex(),  + fieldDef.getSize());

So i 'Step Into ' does i land into  fieldDef.getBeginIndex()?(If i say Step Return will i come back to line 100?)
If I click 'Step Into' do i land into  fieldDef.getSize() method?(()?(If i say Step Return will i come back to line 100?)
 So is it better to put break point at line 99.


Any good video tutorials on this to explain clearly?
Please advise
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoresSpecial  challenge 13 42
countX 22 71
mapBully challenge 6 93
PDFBox - convert image to PDF, PDF resolution 3 70
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now