In PHP, I always just var_dump‘d everything. In Java, when I’m debugging a program such as implement BFS. I am finding it extremely difficult to just System.out.println everything, especially when there are tons of loops.
I think I have a poor practice and workflow. I could use JUnit, but when I have to go through every step to make sure every little thing is true or false and if variables are setting properly and checking each and every section, I am not sure if JUnit is any faster than System.out.println.
I am sure I might be doing something wrong, so I wanted to ask the community for better practices.
Edit: I use Eclipse, just to let you guys know. However, I don’t know how to utilize every aspect of it. I just write code, debug, and compile. Sometimes JUnit, when I am required to use it.
I suggest you start with “Using the eclipse debugger”