how do I debug java code?

Open 1 Answers 13 Views Programming
0 1
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

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.
answered by (817 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.