Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
144 views
in Programming by
I am given java code setup on my eclipse IDE. How do I debug java code? Where do I start? Where should I have my debug point?

1 Answer

0 like 0 dislike
by Master (1.2k points)
Debugging a Java code depends on your IDE.

If you are using Eclipse or Netbeans, you will see line number at the beginning of the line. You can double click on the line and it will set a debug point.

After that, instead of Run, you should use debug command to debug your code.

If you are not using any IDE, you can use the log4j library to setup logs in every function and analyze the logs after the execution.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...