power_settings_new

how do I debug java code?

by
asked
0 votes
23 views
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?

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.

1 Answer

answered by (883 points)
0 votes
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.

Related questions

add
...