Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Java code line by line

Is it possible to debug code line by line in Eclipse showing which line is executing so that I understand the logic of the code? I'm new to programming, please give me suitable advice.

like image 815
fesam Avatar asked Nov 18 '09 08:11

fesam


2 Answers

It is possible if you launch your program in debug mode:

Eclipse Debug

put a breakpoint in the section you want to debug.

Here is a quick tutorial to make a Debug launch configuration:

Debug launch configuration

like image 83
VonC Avatar answered Sep 24 '22 06:09

VonC


you need to:

  1. create a breakpoint by double clicking the left margin of the code
  2. launch your program in debug mode
  3. use the stepping buttons or F5-F8 to step in different ways
like image 21
pstanton Avatar answered Sep 22 '22 06:09

pstanton