# Debugging in the Source Editor

When you open a project, the source editor automatically loads your program sources into its window. The Edit/Debug toolbar, above the source editor window, provides nine debugging buttons. These buttons are activated at different times depending on when you can perform the debugging function. For example, after you click the Restart button, all of the debugging buttons are active.

Restart
  Starts or restarts debugging of the project. All breakpoints and exceptions are retained after restarting the debugger.

Breakpoint
  Sets and removes breakpoints in the selected line of a class. If you click a line that does not have a breakpoint and click this button, JDE sets a breakpoint on the line. If you click a line that has a breakpoint and click this button, the breakpoint is removed.

  To set and remove breakpoints, your source file must meet one of the following conditions:

  - The source file was built within JDE
  - The file is a JDK class or source file
  - The class is already loaded into memory

Evaluate
  Evaluates an expression that you've selected in the source editor window.

Go
  Resumes execution of all threads.

To here
  Executes the program until it reaches the line that contains the insertion point.

Over
  Executes one source line; if the source line is a method call, JDE executes the entire method without stepping through the individual method instructions.

Into
  Executes one source line; if the source line is a method call, JDE stops just before executing the first statement of the method.

Callee
  Moves up the call stack one frame.

Caller
  Moves down the call stack one frame.

The source editor uses these color highlights to relate information about a line of code:

Green
  Indicates the line that was executing when the program stopped

Red
  Indicates a breakpoint is set in the line

Yellow
  Indicates the line contains an error

Purple
  Indicates one of the following:
  - A method was stepped into for which the source code was not available
  - The method call of the current stack frame is highlighted, if you selected a stack frame in the interior of the current thread's stack
  - Code viewed from the class viewer

Blue
  Indicates a string search match

See also:

  Debugging with JDE
  Threads/Stack Overview
  Introduction to Breakpoints