Using the Eclipse Debugger

Norm Krumpe · 438K views · 2012 · 15:32

Open on YouTube

Testing, debugging & developer toolsSoftware practice, open source & careerstutorial

Why Stack Overflow recommends it

Stack Overflow users link it when they want to nudge a beginner to learn step-by-step debugging, especially in Eclipse, instead of posting code for others to trace.

Recommended by 6 people across 6 different months, 2013 to 2022.

What it is

A 15-minute screencast from Norm Krumpe on getting around the Eclipse debugger while writing Java programs. It covers setting breakpoints, stepping through code and watching variables, using two downloadable sample files (Fraction and FractionTester).

What people said

Strong rec Robert Grutza · 2013-09 · Stack Overflow · on “Watching variables contents in Eclipse IDE”

This video does an excellent job of showing you how to set breakpoints and watch variables in the Eclipse Debugger. [this video]

Recommends runDOSrun · 2015-04 · Stack Overflow · on “File input and Output Serialization”

Of course there are videos. Here's one: [this video] The suggestions next to it should list you some others as well.

Recommends Blake O'Hare · 2016-08 · Stack Overflow · on “Arraylist not adding java”

I can tell you your isFriend method isn't doing what you think it is. But since this looks like a homework assignment, I'll instead highly recommend you take a few minutes and become familiar with using a debugger and use that instead, as it will quickly answer your questions. [this video]

Recommends user1097772 · 2017-02 · Stack Overflow · on “Run Time Error : Exception in thread "main" java.util.NoSuchElementException”

@VishnuHariDadhich you should debug your program first instead of asking on SO, look at this videos [LINK] [this video] put the breakpoints on the lines in the that files you see in your error log

Recommends jedzej · 2018-05 · Stack Overflow · on “Large array causing segmentation fault”

That's a lot of complex code to analyze, so instead of giving you a fish, I'll try to give you a rod. Whatever platform, compiler and IDE you're using, there probably is a way to perform step-by-step debugging of your program at runtime. Maybe your assumptions are wrong and the allocation size is not causing this problem. Learning basics of debugging is really great tool in programmer's hands. Here is an example tutorial video: [this video]

Recommends Wadite RK · 2022-01 · Stack Overflow · on “Trying Brute Force technique to solve a leetcode question but gives an error”

What basicly happens with case: [2,3,4,5,18,17,6] is that when the loop get to i=4 and j=5 -> The correct maxArea 17 is saved. The problem is that on the next j loop: i=4, j=6 -> we get to the numbers 18 and 6. Since 18 is bigger than 6 you set maxArea to a new value which is 12 (6*2) and overwrite our desired maxArea to save. Edit I found a change that would make it work by only making some changes to the inner j loop: for(int j = 1 ; j < height.length ; j++) { if(height[i] > height[j]){ if ((height[j] * (j-i)) > maxArea) maxArea = height[j] * (j-i);} else maxArea = height[i] * (j-i); } I added an inner if statement that actually apply the new maxArea only if it's bigger than the current on