I have a problem in Eclipse (with Java 8) that I add a breakpoint for a function in some class in the project. But when the debugging starts, it is from the beginning of the program (from the main method!). Of course, I do not want to follow all the program so please what can I do?
            Asked
            
        
        
            Active
            
        
            Viewed 271 times
        
    3 Answers
1
            
            
        Take a look at the "Debug/Run Configuration..." and uncheck to button to start in debugging in the main method.
how to setup "Main Class" in "Run Configurations" in Eclipse
Uncheck/Check "Stop in main".
Is this what you want to do?
- 
                    Thank you! It does not work and I have just one main class. I will try to explain the problem clearly : Let's say I have the main class and class2 which contains a function "funInClass2 " : I want to see the execution steps of "funInClass2 " so I add the breakpoint there. But when I press F6 to start the debugging, it starts from the first line in main method in class1 !! I have used visual studio before for another programming language, and what I know that usually the execution has to work independently and stops just where the breakpoint is !! and that is what I want. – informatics Apr 15 '16 at 08:09
 - 
                    Try uncheck "Stop in main". – Olli Zi Apr 15 '16 at 09:39
 
0
            Possibly you have a class or method breakpoint...
- You can press 
F8key to jump to next point or you can - Delete the breakpoint.
 
To modify them: open debug perspective and take a look to breakpoints:
if you don't have this, please take a look to other answers. ;)
        Jordi Castilla
        
- 26,609
 - 8
 - 70
 - 109
 
- 
                    1Thanks for your help! I have just one breakpoint (for the function) when I open the breakpoints tab. Even so pressing F8 after the start of the debugging has solved the problem and I get into the function immediately. – informatics Apr 15 '16 at 08:40
 
0
            
            
        Select your debug configuration from menu Run->debug configurations...
Go to main tab and uncheck Stop in main checkbox.
        Sumit Singh
        
- 15,743
 - 6
 - 59
 - 89
 
- 
                    Thank you ! I tried this but it does not work, It still starting the execution from the main method !! – informatics Apr 15 '16 at 08:23
 


